text:
model question

my problem:
TypeError: in user code:
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:855 train_function  *
    return step_function(self, iterator)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:845 step_function  **
    outputs = model.distribute_strategy.run(run_step, args=(data,))
/usr/local/lib/python3.7/dist-packages/tensorflow/python/distribute/distribute_lib.py:1285 run
    return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/distribute/distribute_lib.py:2833 call_for_each_replica
    return self._call_for_each_replica(fn, args, kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/distribute/distribute_lib.py:3608 _call_for_each_replica
    return fn(*args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:838 run_step  **
    outputs = model.train_step(data)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:800 train_step
    self.compiled_metrics.update_state(y, y_pred, sample_weight)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/compile_utils.py:460 update_state
    metric_obj.update_state(y_t, y_p, sample_weight=mask)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/utils/metrics_utils.py:86 decorated
    update_op = update_state_fn(*args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/metrics.py:177 update_state_fn
    return ag_update_state(*args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/metrics.py:666 update_state  **
    matches, sample_weight=sample_weight)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/metrics.py:424 update_state
    with ops.control_dependencies([value_sum]):
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py:5390 control_dependencies
    return get_default_graph().control_dependencies(control_inputs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py:363 control_dependencies
    self.control_captures.add(graph_element)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/keras_tensor.py:242 __hash__
    'Instead, use tensor.ref() as the key.' % self)

TypeError: Tensors are unhashable. (KerasTensor(type_spec=TensorSpec(shape=(), dtype=tf.float32, name=None), name='tf.math.reduce_sum_1/Sum:0', description="created by layer 'tf.math.reduce_sum_1'"))Instead, use tensor.ref() as the key.

and my model:vae
batch_size=6
x = Input(shape=(120,120,3))
conv1 = Conv2d_BN(x, 8, (3, 3))
conv1 = Conv2d_BN(conv1, 8, (3, 3))
pool1 = MaxPooling2D(pool_size=(2,2),strides=(2,2),padding='same')(conv1)
conv2 = Conv2d_BN(pool1, 16, (3, 3))
conv2 = Conv2d_BN(conv2, 16, (3, 3))
pool2 = MaxPooling2D(pool_size=(2,2),strides=(2,2),padding='same')(conv2)
conv3 = Conv2d_BN(pool2, 32, (3, 3))
conv3 = Conv2d_BN(conv3, 32, (3, 3))
pool3 = MaxPooling2D(pool_size=(2,2),strides=(2,2),padding='same')(conv3)
conv4 = Conv2d_BN(pool3, 64, (3, 3))
conv4 = Conv2d_BN(conv4, 64, (3, 3))
pool4 = MaxPooling2D(pool_size=(2,2),strides=(2,2),padding='same')(conv4)
conv5 = Conv2d_BN(pool4, 128, (3, 3))
conv5 = Dropout(0.5)(conv5)
conv5 = Conv2d_BN(conv5, 128, (3, 3))
conv5 = Dropout(0.5)(conv5)
F=Flatten()(conv5)
h = Dense(256, activation='relu')(F)
z_mean = Dense(2)(h)
z_log_var = Dense(2)(h)
def sampling(args):
z_mean, z_log_var = args
#print(type(args))
#print(type(z_log_var))
#print(type(z_mean))
epsilon = K.random_normal(shape=(2,), mean=0.,
stddev=1.0)
#print(type(epsilon))
return z_mean + K.exp(z_log_var / 2) * epsilon
z = Lambda(sampling,name = 'sampling', output_shape=(2))([z_mean, z_log_var])
decoder_h = Dense(256, activation='relu')
decoder_mean = Dense(256, activation='sigmoid')
h_decoded = decoder_h(z)
x_decoded_mean = decoder_mean(h_decoded)
decoder=Dense(88128,activation='relu')(x_decoded_mean)
decoder=Reshape((8,8,128))(decoder)
decoder = Conv2DTranspose(128, kernel_size=(3,3), strides=2)(decoder)
decoder = Conv2D(filters=128, kernel_size=(3,3), strides=(1,1), activation='sigmoid')(decoder)
convt1 = Conv2dT_BN(decoder, 64, (3, 3))
convt1 = Dropout(0.5)(convt1)
conv6 = Conv2d_BN(convt1, 64, (3, 3))
conv6 = Conv2d_BN(conv6, 64, (3, 3))
convt2 = Conv2dT_BN(conv6, 32, (3, 3))
convt2  = Dropout(0.5)(convt2)
conv7 = Conv2d_BN(convt2 , 32, (3, 3))
conv7 = Conv2d_BN(conv7, 32, (3, 3))
convt3 = Conv2dT_BN(conv7, 16, (3, 3))
convt3 = Dropout(0.5)(convt3)
conv8 = Conv2d_BN(convt3, 16, (3, 3))
conv8 = Conv2d_BN(conv8, 16, (3, 3))
outpt = Conv2D(filters=3, kernel_size=(1,1), strides=(1,1), padding='same', activation='sigmoid')(conv8)
vae = Model(inputs=x, outputs=outpt)
vae.compile(optimizer='adam',loss='mean_squared_error',metrics = [KL_loss, recon_loss])
vae.summary()
how can i solve this question

Does this https://stackoverflow.com/questions/61056781/typeerror-tensor-is-unhashable-instead-use-tensor-ref-as-the-key-in-keras help in your case?

authors: ewwll ymodak


text:
Tensorflow on android: directly build app in python?

The sample app given by google for tensorflow on android is written in C++.
I have a tensorflow application written in python. This application currently runs on desktop. I want to move the application to android platform. Can I use bazel to build the application that is written in python directly for android? Thanks.

@michaelhuang74 No, the short answer is that it is not possible (or at least supported) to run any TensorFlow python code on Android. However, you may of course reuse your trained GraphDef proto (after running optimize_for_inference.py on it to bake in the checkpoint weights), and if your interaction with TensorFlow is not too complex you should be able to fairly easily hook up your inputs and outputs to achieve the same effect in either Java or C++.
Can you clarify a bit more exactly what you're trying to achieve? Do you have an existing app you wanted to hook the python code into, or did you want to run it as a standalone program? In the former case, you'll need to convert it to use TensorFlowInferenceInterface.java. In the latter, you'll want to convert to C++ as seen in tensorflow/tools/benchmark:benchmark_model.

@andrewharp  Thank you very much for your reply.
The python application that I want to move to android is evaluate.py at https://github.com/lengstrom/fast-style-transfer.
evaluate.py will take a model file (checkpoint file) generated by the style.py and stylize an input image.  Style.py will stay on desktop computer. I intend to move the evaluate.py to android.
I am new to both tensorflow and application development on android. I appreciate if you can provide some specifics how to modify the sample tensorflow on android demo to port the evaluate.py to android platform. Thanks.

While convert python code to C++ code, we find that the python code uses several python APIs such as tf.nn.tanh, tf.nn.conv2d, tf.nn.relu, tf.nn.moment, tf.nn.conv2d_transpose.
Where in the tensorflow repository can I find the C++ implementation for the above python APIs? Thanks.

TF should find these operations automatically when loading your trained GraphDef, which you should use freeze_graph.py to create in conjunction with your checkpoint file. You do not need to refer to them by name in the Android app, you just need to set the input and output nodes similar to how the demo does it in ClassifierActivity
Apologies for the delayed response! This is not a TF issue though -- you may have better luck on with these sorts of queries on stackoverlow.

@andrewharp I have written a slightly more complex architecture in TF which is ConvNet + LSTMs with visual attention. Closer to Im2Text than your classifier models. Say I checkpoint my graph and rewrite ClassifierActivity as instructed in your previous comment, will I be able to make it work on an Android device?
If not, what other changes might I have to make?

Is is possible to execute tf.gradients in android environment.
I have to take gradients in Android application.
What is the best way to do so.
Thanks

source: gharchive/issue

repo: tensorflow/tensorflow

license_type: permissive

license_source: github-api


text:
tensorflow.experimental.dtensor.relayout segfaults going from sharded layout to replicated layout

Issue Type
Bug
Source
binary
Tensorflow Version
v2.9.0-rc2-42-g8a20d54a3c1 2.9.0
Custom Code
No
OS Platform and Distribution
Linux Ubuntu 20.04.4
Mobile device
No response
Python version
3.8.10
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
CUDA 11.6
GPU model and memory
GPU A100
Current Behaviour?
tensorflow.experimental.dtensor.relayout crashes (segfaults) going from sharded layout to replicated layout on GPUs.
See output and stack trace.
Standalone code to reproduce the issue
Script to reproduce issue on a system with 2 or more GPUs:
import tensorflow as tf
from tensorflow.experimental import dtensor

size=2
devices = [f'GPU:{i}' for i in range(size)]
mesh_1d = dtensor.create_mesh([('x', size)], devices=devices)
layout = dtensor.Layout(['x', dtensor.UNSHARDED], mesh_1d)

components=[]
for i, dev in enumerate(devices):
    with tf.device(dev):
        local_component = tf.range(i*2, 2 + i * 2)
        local_component = tf.reshape(local_component, [1, 2])
        print('local_component', local_component)
    components.append(local_component)
my_dtensor = dtensor.pack(components,layout)
print('my_dtensor', my_dtensor)

fully_replicated_layout = dtensor.Layout([dtensor.UNSHARDED, dtensor.UNSHARDED], mesh_1d)
replicated_dtensor = dtensor.relayout(my_dtensor, fully_replicated_layout)
print('fully_replicated_dtensor', replicated_dtensor)

Relevant log output
Output:
2022-05-20 09:20:53.653386: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-05-20 09:20:56.910871: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 79133 MB memory:  -> device: 0, name: NVIDIA A100-SXM4-80GB, pci bus id: 0000:07:00.0, compute capability: 8.0
2022-05-20 09:20:56.912562: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:1 with 79133 MB memory:  -> device: 1, name: NVIDIA A100-SXM4-80GB, pci bus id: 0000:0f:00.0, compute capability: 8.0
local_component tf.Tensor([[0 1]], shape=(1, 2), dtype=int32)
local_component tf.Tensor([[2 3]], shape=(1, 2), dtype=int32)
my_dtensor tf.Tensor({"GPU:0": [[0 1]], "GPU:1": [[2 3]]}, layout="sharding_specs:x,unsharded, mesh:|x=2|0,1|0,1|/job:localhost/replica:0/task:0/device:GPU:0,/job:localhost/replica:0/task:0/device:GPU:1", shape=(2, 2), dtype=int32)
Segmentation fault (core dumped)

Stack trace from core dump:
#0  0x00007f8e6acea66c in __memmove_chk_avx_unaligned () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:123
#1  0x00007f8e44e0cf86 in tensorflow::Status tensorflow::functor::DoCopy<Eigen::ThreadPoolDevice>(Eigen::ThreadPoolDevice const&, tensorflow::Tensor const&, tensorflow::Tensor*) () from /usr/local/lib/python3.8/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#2  0x00007f8e42bfdf59 in tensorflow::StridedSliceAssignOp<Eigen::ThreadPoolDevice, int, true>::Compute(tensorflow::OpKernelContext*) () from /usr/local/lib/python3.8/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#3  0x00007f8e38308aac in tensorflow::BaseGPUDevice::Compute(tensorflow::OpKernel*, tensorflow::OpKernelContext*) () from /usr/local/lib/python3.8/dist-packages/tensorflow/python/../libtensorflow_framework.so.2
#4  0x00007f8e3840db7d in tensorflow::(anonymous namespace)::ExecutorState<tensorflow::PropagatorState>::Process(tensorflow::PropagatorState::TaggedNode, long) () from /usr/local/lib/python3.8/dist-packages/tensorflow/python/../libtensorflow_framework.so.2
#5  0x00007f8e3840ed48 in std::_Function_handler<void (), tensorflow::(anonymous namespace)::ExecutorState<tensorflow::PropagatorState>::RunTask<tensorflow::(anonymous namespace)::ExecutorState<tensorflow::PropagatorState>::ScheduleReady(absl::lts_20211102::InlinedVector<tensorflow::PropagatorState::TaggedNode, 8ul, std::allocator<tensorflow::PropagatorState::TaggedNode> >*, tensorflow::PropagatorState::TaggedNodeReadyQueue*)::{lambda()#2}>(tensorflow::(anonymous namespace)::ExecutorState<tensorflow::PropagatorState>::ScheduleReady(absl::lts_20211102::InlinedVector<tensorflow::PropagatorState::TaggedNode, 8ul, std::allocator<tensorflow::PropagatorState::TaggedNode> >*, tensorflow::PropagatorState::TaggedNodeReadyQueue*)::{lambda()#2}&&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
   from /usr/local/lib/python3.8/dist-packages/tensorflow/python/../libtensorflow_framework.so.2
#6  0x00007f8e4613db95 in Eigen::ThreadPoolTempl<tensorflow::thread::EigenEnvironment>::WorkerLoop(int) () from /usr/local/lib/python3.8/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#7  0x00007f8e4613b8c3 in std::_Function_handler<void (), tensorflow::thread::EigenEnvironment::CreateThread(std::function<void ()>)::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /usr/local/lib/python3.8/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#8  0x00007f8e38b574fb in tensorflow::(anonymous namespace)::PThread::ThreadFn(void*) () from /usr/local/lib/python3.8/dist-packages/tensorflow/python/../libtensorflow_framework.so.2
#9  0x00007f8e6ab44609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#10 0x00007f8e6ac7e163 in umount2 () at ../sysdeps/unix/sysv/linux/umount2.S:8
#11 0x0000000000000000 in ?? ()

CC @bfontain

Hi @nvcastet, thanks for pinging me on this issue. We are taking a look to see the underlying cause. We do have some internal testing covering things like so its a slightly surprising failure :)

Thanks  @bfontain, I can confirm that it works well for dtype=float32.

Thanks, we fixed the segfault via: https://github.com/tensorflow/tensorflow/commit/0dfe3a30325905023f17535334114f897f3f1a58
But we now run into lack of support for collective reduce for int32 on GPU in TensorFlow:
https://github.com/tensorflow/tensorflow/blob/d93fabd5961154c7fa3bdcbbb90ecfd35e312052/tensorflow/core/common_runtime/base_collective_executor.cc#L419

Thanks a lot for debugging this issue @bfontain .
NCCL supports int32 so it should not be to completed to add the support.

Hi @nvcastet !
I was getting below error in 2.10.rc1

"collective reduce of int32 is not supported ,casting to int64 is a workaround "

So I cast the outputs like these to resolve above issue.
for i, dev in enumerate(devices):
    with tf.device(dev):
        local_component = tf.range(i*2, 2 + i * 2)
        local_component = tf.reshape(local_component, [1, 2])
        local_component = tf.cast(local_component,dtype=tf.int64)
        print('local_component', local_component)

Could you try this work around and let us know.
Thank you!

@mohantym Yes casting is a good workaround, but if you want to communicate/reduce in int32, we will need to add the int32 NCCL support in TF.

@nvcastet I tried to replicate the issue using the provided code but the code is not crashing in TF v2.13. Please have a look at this colab gist. Thank you!

authors: bfontain mohantym nvcastet sushreebarsa


text:
Versioning scheme of CVE patches

(I posted this questions first to the tensorflow forums, but I think it fits here better)
I'm using TF 2.7.2 and was wondering if the recently published CVEs (e.g. CVE-2022-36001) are fixed in 2.7.2? As far as I understood, they are fixed first in 2.7.4. The github security advisory is not complety obvious to me: https://github.com/tensorflow/tensorflow/security/advisories/GHSA-g35r-369w-3fqp
It says patched versions are: 2.7.2, 2.8.1, 2.9.1, 2.10.0. While 2.10.0 is patched and doesn't contain the vulnerability, the other versions are not patched when looking at the code on github, corresponding to the tags. Also the release notes only mention the CVE in 2.7.4, 2.8.3, 2.9.2 and 2.10.0
Other projects, like nodeBB for example, just mention the fixed release versions under "Patched versions" which makes a clear split between affected and unaffected versions (e.g. https://github.com/NodeBB/NodeBB/security/advisories/GHSA-p4cc-w597-6cpm).
So is there a release tagged 2.7.2 with the cherry-picked fix included or are the secure releases only: >= 2.7.4, < 2.8 | >= 2.8.3, < 2.9 | >= 2.9.2 ?
If not, what is the rationale behind listing patched and unpatched version numbers together under "Patched versions"?
Click to expand!
Issue Type
Documentation Bug
Source
source
Tensorflow Version
2.7.2
Custom Code
No
OS Platform and Distribution
No response
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
---

Standalone code to reproduce the issue
---

Relevant log output
No response

@slashleo
Usually any patch fix is done and it will be included in the latest version of that release branch. So, during 2.10.0 release 2.7.4 was the latest release version for 2.7 and we cannot patch it to the previous version.
Now the issue in documentation is fixed, Please refer to the below snapshot.

Thank you !

Thank you for clarifying


text:
TypeError: tensor_equals() missing 1 required positional argument: 'other' #47390

Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.3
Custom code
Yes

class CoordinateChannel(Layer):
    """ Adds Coordinate Channels to the input tensor.
    # Arguments
        rank: An integer, the rank of the input data-uniform,
            e.g. "2" for 2D convolution.
        use_radius: Boolean flag to determine whether the
            radius coordinate should be added for 2D rank
            inputs or not.
        data_format: A string,
            one of `"channels_last"` or `"channels_first"`.
            The ordering of the dimensions in the inputs.
            `"channels_last"` corresponds to inputs with shape
            `(batch, ..., channels)` while `"channels_first"` corresponds to
            inputs with shape `(batch, channels, ...)`.
            It defaults to the `image_data_format` value found in your
            Keras config file at `~/.keras/keras.json`.
            If you never set it, then it will be "channels_last".
    # Input shape
        ND tensor with shape:
        `(samples, channels, *)`
        if `data_format` is `"channels_first"`
        or ND tensor with shape:
        `(samples, *, channels)`
        if `data_format` is `"channels_last"`.
    # Output shape
        ND tensor with shape:
        `(samples, channels + 2, *)`
        if `data_format` is `"channels_first"`
        or 5D tensor with shape:
        `(samples, *, channels + 2)`
        if `data_format` is `"channels_last"`.
    # References:
        - [An Intriguing Failing of Convolutional Neural Networks and the CoordConv Solution](https://arxiv.org/abs/1807.03247)
    """

    def __init__(self, rank,
                 use_radius=False,
                 data_format=None,
                 **kwargs):
        super(CoordinateChannel, self).__init__(**kwargs)

        if data_format not in [None, 'channels_first', 'channels_last']:
            raise ValueError('`data_format` must be either "channels_last", "channels_first" '
                             'or None.')

        self.rank = rank
        self.use_radius = use_radius
        self.data_format = K.image_data_format() if data_format is None else data_format
        self.axis = 1 if K.image_data_format() == 'channels_first' else -1

        self.input_spec = InputSpec(min_ndim=2)
        self.supports_masking = True

    def build(self, input_shape):
        assert len(input_shape) >= 2
        input_dim = input_shape[self.axis]

        self.input_spec = InputSpec(min_ndim=self.rank + 2,
                                    axes={self.axis: input_dim})
        self.built = True

    def call(self, inputs, training=None, mask=None):
        input_shape = K.shape(inputs)

        if self.rank == 1:
            input_shape = [input_shape[i] for i in range(3)]
            batch_shape, dim, channels = input_shape

            xx_range = K.tile(K.expand_dims(K.arange(0, dim, dtype='float32'), axis=0),
                              K.stack([batch_shape, 1]))
            xx_range = K.expand_dims(xx_range, axis=-1)

            xx_channels = K.cast(xx_range, K.floatx())
            xx_channels = xx_channels / K.cast(dim - 1, K.floatx())
            xx_channels = (xx_channels * 2) - 1.

            outputs = K.concatenate([inputs, xx_channels], axis=-1)

        if self.rank == 2:
            if self.data_format == 'channels_first':
                inputs = K.permute_dimensions(inputs, [0, 2, 3, 1])
                input_shape = K.shape(inputs)

            input_shape = [input_shape[i] for i in range(4)]
            batch_shape, dim1, dim2, channels = input_shape

            xx_ones = tf.ones(K.stack([batch_shape, dim2]), dtype='float32')
            xx_ones = K.expand_dims(xx_ones, axis=-1)

            xx_range = K.tile(K.expand_dims(K.arange(0, dim1, dtype='float32'), axis=0),
                              K.stack([batch_shape, 1]))
            xx_range = K.expand_dims(xx_range, axis=1)
            xx_channels = K.batch_dot(xx_ones, xx_range, axes=[2, 1])
            xx_channels = K.expand_dims(xx_channels, axis=-1)
            xx_channels = K.permute_dimensions(xx_channels, [0, 2, 1, 3])

            yy_ones = tf.ones(K.stack([batch_shape, dim1]), dtype='float32')
            yy_ones = K.expand_dims(yy_ones, axis=1)

            yy_range = K.tile(K.expand_dims(K.arange(0, dim2, dtype='float32'), axis=0),
                              K.stack([batch_shape, 1]))
            yy_range = K.expand_dims(yy_range, axis=-1)

            yy_channels = K.batch_dot(yy_range, yy_ones, axes=[2, 1])
            yy_channels = K.expand_dims(yy_channels, axis=-1)
            yy_channels = K.permute_dimensions(yy_channels, [0, 2, 1, 3])

            xx_channels = K.cast(xx_channels, K.floatx())
            xx_channels = xx_channels / K.cast(dim1 - 1, K.floatx())
            xx_channels = (xx_channels * 2) - 1.

            yy_channels = K.cast(yy_channels, K.floatx())
            yy_channels = yy_channels / K.cast(dim2 - 1, K.floatx())
            yy_channels = (yy_channels * 2) - 1.

            # import pdb;pdb.set_trace()
            outputs = K.concatenate([inputs, xx_channels, yy_channels], axis=-1)
            # outputs = K.concatenate([inputs, tf.cast(xx_channels, dtype=tf.float16), tf.cast(yy_channels, dtype=tf.float16)], axis=-1)

            if self.use_radius:
                rr = K.sqrt(K.square(xx_channels - 0.5) +
                            K.square(yy_channels - 0.5))
                outputs = K.concatenate([outputs, rr], axis=-1)

            if self.data_format == 'channels_first':
                outputs = K.permute_dimensions(outputs, [0, 3, 1, 2])

        if self.rank == 3:
            if self.data_format == 'channels_first':
                inputs = K.permute_dimensions(inputs, [0, 2, 3, 4, 1])
                input_shape = K.shape(inputs)

            input_shape = [input_shape[i] for i in range(5)]
            batch_shape, dim1, dim2, dim3, channels = input_shape

            xx_ones = tf.ones(K.stack([batch_shape, dim3]), dtype='float32')
            xx_ones = K.expand_dims(xx_ones, axis=-1)

            xx_range = K.tile(K.expand_dims(K.arange(0, dim2, dtype='float32'), axis=0),
                              K.stack([batch_shape, 1]))
            xx_range = K.expand_dims(xx_range, axis=1)

            xx_channels = K.batch_dot(xx_ones, xx_range, axes=[2, 1])
            xx_channels = K.expand_dims(xx_channels, axis=-1)
            xx_channels = K.permute_dimensions(xx_channels, [0, 2, 1, 3])

            xx_channels = K.expand_dims(xx_channels, axis=1)
            xx_channels = K.tile(xx_channels,
                                 [1, dim1, 1, 1, 1])

            yy_ones = tf.ones(K.stack([batch_shape, dim2]), dtype='float32')
            yy_ones = K.expand_dims(yy_ones, axis=1)

            yy_range = K.tile(K.expand_dims(K.arange(0, dim3, dtype='float32'), axis=0),
                              K.stack([batch_shape, 1]))
            yy_range = K.expand_dims(yy_range, axis=-1)

            yy_channels = K.batch_dot(yy_range, yy_ones, axes=[2, 1])
            yy_channels = K.expand_dims(yy_channels, axis=-1)
            yy_channels = K.permute_dimensions(yy_channels, [0, 2, 1, 3])

            yy_channels = K.expand_dims(yy_channels, axis=1)
            yy_channels = K.tile(yy_channels,
                                 [1, dim1, 1, 1, 1])

            zz_range = K.tile(K.expand_dims(K.arange(0, dim1, dtype='float32'), axis=0),
                              K.stack([batch_shape, 1]))
            zz_range = K.expand_dims(zz_range, axis=-1)
            zz_range = K.expand_dims(zz_range, axis=-1)

            zz_channels = K.tile(zz_range,
                                 [1, 1, dim2, dim3])
            zz_channels = K.expand_dims(zz_channels, axis=-1)

            xx_channels = K.cast(xx_channels, K.floatx())
            xx_channels = xx_channels / K.cast(dim2 - 1, K.floatx())
            xx_channels = xx_channels * 2 - 1.

            yy_channels = K.cast(yy_channels, K.floatx())
            yy_channels = yy_channels / K.cast(dim3 - 1, K.floatx())
            yy_channels = yy_channels * 2 - 1.

            zz_channels = K.cast(zz_channels, K.floatx())
            zz_channels = zz_channels / K.cast(dim1 - 1, K.floatx())
            zz_channels = zz_channels * 2 - 1.

            outputs = K.concatenate([inputs, zz_channels, xx_channels, yy_channels],
                                    axis=-1)

            if self.data_format == 'channels_first':
                outputs = K.permute_dimensions(outputs, [0, 4, 1, 2, 3])

        return outputs

    def compute_output_shape(self, input_shape):
        assert input_shape and len(input_shape) >= 2
        assert input_shape[self.axis]

        if self.use_radius and self.rank == 2:
            channel_count = 3
        else:
            channel_count = self.rank

        output_shape = list(input_shape)
        output_shape[self.axis] = input_shape[self.axis] + channel_count
        return tuple(output_shape)

    def get_config(self):
        config = {
            'rank': self.rank,
            'use_radius': self.use_radius,
            'data_format': self.data_format
        }
        base_config = super(CoordinateChannel, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))

class TransformerDecoderLayer(layers.Layer):
    def __init__(self, d_model, num_heads, dim_feedforward, regularizer_rate=0, dropout=0.1, vocab_size=2):
        super(TransformerDecoderLayer, self).__init__()
        self.last_attn_scores = None
        self.regularizer_rate = regularizer_rate
        self.kernel_regularizer = l2(regularizer_rate)
        self.self_attn = layers.MultiHeadAttention(num_heads=num_heads, key_dim=d_model, dropout=dropout)
        self.multihead_attn = layers.MultiHeadAttention(num_heads=num_heads, key_dim=d_model, dropout=dropout)

        self.linear1 = layers.Dense(dim_feedforward, activation='relu', kernel_regularizer=self.kernel_regularizer)
        self.dropout = layers.Dropout(dropout)
        self.linear2 = layers.Dense(d_model, kernel_regularizer=self.kernel_regularizer)

        self.norm1 = layers.LayerNormalization(epsilon=1e-6)
        self.norm2 = layers.LayerNormalization(epsilon=1e-6)
        self.norm3 = layers.LayerNormalization(epsilon=1e-6)
        self.dropout1 = layers.Dropout(dropout)
        self.dropout2 = layers.Dropout(dropout)
        self.dropout3 = layers.Dropout(dropout)
        self.d_model = d_model
        self.vocab_size = vocab_size
        self.drop_out_rate = dropout

    def get_config(self):
        config = {
            'd_model': self.d_model,
            'num_heads': self.d_model//32,
            'dim_feedforward': self.d_model*4,
            'dropout': self.drop_out_rate,
            'vocab_size': self.vocab_size,
            'regularizer_rate': self.regularizer_rate,
        }
        return config

    def call(self, tgt, memory, tgt_mask=None, memory_mask=None, tgt_key_padding_mask=None,
             memory_key_padding_mask=None):
        tgt = PositionalEmbedding(self.vocab_size, self.d_model, tgt.shape[1]).call(tgt)
        look_ahead_mask = self.create_look_ahead_mask(tgt.shape[1])
        look_ahead_mask = look_ahead_mask[tf.newaxis, :, :]

        tgt2 = self.self_attn(query=tgt, value=tgt, key=tgt, attention_mask=look_ahead_mask)[0]
        tgt = tgt + self.dropout1(tgt2)
        tgt = self.norm1(tgt)

        multihead_attn_output = self.multihead_attn(query=tgt, value=memory, key=memory, return_attention_scores=True)
        tgt2 = multihead_attn_output[0][0]
        attn_scores = multihead_attn_output[1][0]
        tgt = tgt + self.dropout2(tgt2)
        tgt = self.norm2(tgt)

        self.last_attn_scores = attn_scores

        tgt2 = self.linear2(self.dropout(self.linear1(tgt)))
        tgt = tgt + self.dropout3(tgt2)
        tgt = self.norm3(tgt)
        return tgt

    def create_look_ahead_mask(self, size):
        mask = 1 - tf.linalg.band_part(tf.ones((size, size)), -1, 0)
        return mask  # (seq_len, seq_len)

def add_regularizers(model, regularizer, custom_objects=None):
    '''
    :param regularizer: The regularizer you want to add
    :param model: The model you want to add regularizer.
    Make sure you freeze layer before pass in otherwise it will add regularizer to all layers
    :return: The model after regularizers added.
    '''
    from tensorflow.keras.models import model_from_json
    import os, shutil, uuid
    random_number = uuid.uuid4()
    folder = './tmp-{random_number}'.format(random_number=random_number)
    tmp_filename = 'tmp.ckpt'
    tmp_file_path = os.path.join(folder, tmp_filename)

    os.makedirs(folder, exist_ok=True)
    model.save_weights(tmp_file_path)

    for layer in model.layers:
        for attr in ['kernel_regularizer', 'bias_regularizer', 'depthwise_regularizer', 'pointwise_regularizer']:
            if hasattr(layer, attr) and layer.trainable:
                if attr == 'bias_regularizer' and not layer.use_bias:
                    continue
                setattr(layer, attr, regularizer)

    out = model_from_json(model.to_json(), custom_objects=custom_objects)
    out.load_weights(tmp_file_path)
    shutil.rmtree(folder)
    return out

    ```
Trying to use  add_regularizers to model with self designed layer, but failed.

### Standalone code to reproduce the issue

```shell
x1 = Input(shape=[64, 7,7, 256])
x2 = Input(shape=[64, 159])
x  = layers.GlobalAveragePooling2D()(x1)
x  = layers.Dense(256, use_bias=False)(x)
x  = tf.expand_dims(x , axis=1)
x  = TransformerDecoderLayer(128, 128 // 32, 128 * 4, 0.2)(x2, x)
model = Model(inputs=[x1, x2], outputs=x)

model = add_regularizers(model, l2(l2_rate), custom_objects={
            "TransformerDecoderLayer": TransformerDecoderLayer
        })

or

from tensorflow.keras.models import model_from_json

with open("/data/sbot_shared_2/qiwang/cv/barcode_deblur/model.json", "r") as json_file:
    json_string = json_file.read()
model = model_from_json(json_string, custom_objects={"TransformerDecoderLayer":TransformerDecoderLayer,"CoordinateChannel": CoordinateChannel,}))

Relevant log output
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/saving/model_config.py", line 131, in model_from_json
return deserialize(config, custom_objects=custom_objects)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/serialization.py", line 177, in deserialize
printable_module_name='layer')
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/generic_utils.py", line 358, in deserialize_keras_object
list(custom_objects.items())))
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/functional.py", line 669, in from_config
config, custom_objects)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/functional.py", line 1285, in reconstruct_from_config
process_node(layer, node_data)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/functional.py", line 1233, in process_node
output_tensors = layer(input_tensors, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 952, in call
input_list)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 1091, in _functional_construction_call
inputs, input_masks, args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 822, in _keras_tensor_symbolic_call
return self._infer_output_signature(inputs, args, kwargs, input_masks)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 863, in _infer_output_signature
outputs = call_fn(inputs, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/core.py", line 1327, in _call_wrapper
return self._call_wrapper(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/core.py", line 1359, in _call_wrapper
result = self.function(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
return target(*args, **kwargs)
TypeError: tensor_not_equals() missing 1 required positional argument: 'other'
Json file use to load model

{"class_name": "Functional", "config": {"name": "model", "layers": [{"class_name": "InputLayer", "config": {"batch_input_shape": [null, 224, 224, 1], "dtype": "float32", "sparse": false, "ragged": false, "name": "input_1"}, "name": "input_1", "inbound_nodes": []}, {"class_name": "CoordinateChannel", "config": {"name": "coordinate_channel", "trainable": true, "dtype": "float32", "rank": 2, "use_radius": false, "data_format": "channels_last"}, "name": "coordinate_channel", "inbound_nodes": [[["input_1", 0, 0, {}]]]}, {"class_name": "Sequential", "config": {"name": "sequential", "layers": [{"class_name": "InputLayer", "config": {"batch_input_shape": [null, 224, 224, 3], "dtype": "float32", "sparse": false, "ragged": false, "name": "conv2d_input"}}, {"class_name": "Conv2D", "config": {"name": "conv2d", "trainable": true, "dtype": "float32", "filters": 48, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_1", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_1", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_1", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_1", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_2", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_2", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_2", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_2", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_3", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_3", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_3", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_3", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_4", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_4", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_4", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_4", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_5", "trainable": true, "dtype": "float32", "filters": 96, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_5", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_5", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_5", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}}, {"class_name": "Dropout", "config": {"name": "dropout_6", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_6", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_6", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_6", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_7", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_7", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_7", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_7", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_8", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_8", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_8", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_8", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_9", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_9", "trainable": true, "dtype": "float32", "filters": 384, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_9", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_9", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_10", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_1", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}}, {"class_name": "Dropout", "config": {"name": "dropout_11", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_10", "trainable": true, "dtype": "float32", "filters": 1536, "kernel_size": [1, 1], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_10", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_10", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_12", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_11", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [1, 1], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_11", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_11", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_13", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_12", "trainable": true, "dtype": "float32", "filters": 192, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_12", "trainable": true, "dtype": "float32", "axis": [3], "momentum": 0.05, "epsilon": 1e-05, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "ReLU", "config": {"name": "re_lu_12", "trainable": true, "dtype": "float32", "max_value": null, "negative_slope": 0.0, "threshold": 0.0}}, {"class_name": "Dropout", "config": {"name": "dropout_14", "trainable": true, "dtype": "float32", "rate": 0.0, "noise_shape": null, "seed": null}}]}, "name": "sequential", "inbound_nodes": [[["coordinate_channel", 0, 0, {}]]]}, {"class_name": "GlobalAveragePooling2D", "config": {"name": "global_average_pooling2d_1", "trainable": true, "dtype": "float32", "data_format": "channels_last"}, "name": "global_average_pooling2d_1", "inbound_nodes": [[["sequential", 1, 0, {}]]]}, {"class_name": "InputLayer", "config": {"batch_input_shape": [null, 159], "dtype": "float32", "sparse": false, "ragged": false, "name": "input_2"}, "name": "input_2", "inbound_nodes": []}, {"class_name": "Dense", "config": {"name": "dense_4", "trainable": true, "dtype": "float32", "units": 450, "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "dense_4", "inbound_nodes": [[["global_average_pooling2d_1", 0, 0, {}]]]}, {"class_name": "GlobalAveragePooling2D", "config": {"name": "global_average_pooling2d", "trainable": true, "dtype": "float32", "data_format": "channels_last"}, "name": "global_average_pooling2d", "inbound_nodes": [[["sequential", 1, 0, {}]]]}, {"class_name": "Dense", "config": {"name": "dense", "trainable": true, "dtype": "float32", "units": 256, "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "dense", "inbound_nodes": [[["global_average_pooling2d", 0, 0, {}]]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.expand_dims", "trainable": true, "dtype": "float32", "function": "expand_dims"}, "name": "tf.expand_dims", "inbound_nodes": [["dense", 0, 0, {"axis": 1}]]}, {"class_name": "TransformerDecoderLayer", "config": {"d_model": 256, "num_heads": 8, "dim_feedforward": 1024, "dropout": 0.0, "vocab_size": 2, "regularizer_rate": 3e-06}, "name": "transformer_decoder_layer", "inbound_nodes": [[["input_2", 0, 0, {"memory": ["tf.expand_dims", 0, 0]}]]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast", "inbound_nodes": [["input_2", 0, 0, {"dtype": "float32"}]]}, {"class_name": "Dense", "config": {"name": "dense_3", "trainable": true, "dtype": "float32", "units": 2, "activation": "linear", "use_bias": false, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": {"class_name": "L2", "config": {"l2": 3.000000106112566e-06}}, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "name": "dense_3", "inbound_nodes": [[["transformer_decoder_layer", 0, 0, {}]]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.convert_to_tensor_1", "trainable": true, "dtype": "float32", "function": "convert_to_tensor"}, "name": "tf.convert_to_tensor_1", "inbound_nodes": [["tf.cast", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.convert_to_tensor", "trainable": true, "dtype": "float32", "function": "convert_to_tensor"}, "name": "tf.convert_to_tensor", "inbound_nodes": [["dense_3", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast_1", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast_1", "inbound_nodes": [["tf.convert_to_tensor_1", 0, 0, {"dtype": "int64"}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.convert_to_tensor_2", "trainable": true, "dtype": "float32", "function": "convert_to_tensor"}, "name": "tf.convert_to_tensor_2", "inbound_nodes": [["tf.convert_to_tensor", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.nn.sparse_softmax_cross_entropy_with_logits", "trainable": true, "dtype": "float32", "function": "nn.sparse_softmax_cross_entropy_with_logits"}, "name": "tf.nn.sparse_softmax_cross_entropy_with_logits", "inbound_nodes": [["tf.cast_1", 0, 0, {"logits": ["tf.convert_to_tensor_2", 0, 0]}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast_2", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast_2", "inbound_nodes": [["tf.nn.sparse_softmax_cross_entropy_with_logits", 0, 0, {"dtype": "float32"}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.multiply", "trainable": true, "dtype": "float32", "function": "math.multiply"}, "name": "tf.math.multiply", "inbound_nodes": [["tf.cast_2", 0, 0, {"y": 1.0}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.__operators__.ne", "trainable": true, "dtype": "float32", "function": "__operators__.ne"}, "name": "tf.__operators__.ne", "inbound_nodes": [["input_2", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast_3", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast_3", "inbound_nodes": [["tf.math.multiply", 0, 0, {"dtype": "float32"}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.cast_4", "trainable": true, "dtype": "float32", "function": "cast"}, "name": "tf.cast_4", "inbound_nodes": [["tf.__operators__.ne", 0, 0, {"dtype": "float32"}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.multiply_1", "trainable": true, "dtype": "float32", "function": "math.multiply"}, "name": "tf.math.multiply_1", "inbound_nodes": [["tf.cast_3", 0, 0, {"y": ["tf.cast_4", 0, 0], "name": null}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.reduce_sum", "trainable": true, "dtype": "float32", "function": "math.reduce_sum"}, "name": "tf.math.reduce_sum", "inbound_nodes": [["tf.math.multiply_1", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.reduce_sum_1", "trainable": true, "dtype": "float32", "function": "math.reduce_sum"}, "name": "tf.math.reduce_sum_1", "inbound_nodes": [["tf.cast_4", 0, 0, {}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.truediv", "trainable": true, "dtype": "float32", "function": "math.truediv"}, "name": "tf.math.truediv", "inbound_nodes": [["tf.math.reduce_sum", 0, 0, {"y": ["tf.math.reduce_sum_1", 0, 0], "name": null}]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.multiply_2", "trainable": true, "dtype": "float32", "function": "math.multiply"}, "name": "tf.math.multiply_2", "inbound_nodes": [["tf.math.truediv", 0, 0, {"y": 0.5, "name": null}]]}, {"class_name": "AddLoss", "config": {"name": "add_loss", "trainable": true, "dtype": "float32", "unconditional": false}, "name": "add_loss", "inbound_nodes": [[["tf.math.multiply_2", 0, 0, {}]]]}, {"class_name": "TFOpLambda", "config": {"name": "tf.math.multiply_3", "trainable": true, "dtype": "float32", "function": "math.multiply"}, "name": "tf.math.multiply_3", "inbound_nodes": [["tf.math.truediv", 0, 0, {"y": 0.5, "name": null}]]}, {"class_name": "AddMetric", "config": {"name": "add_metric", "trainable": true, "dtype": "float32", "aggregation": "mean", "metric_name": "transformer_decoder_loss"}, "name": "add_metric", "inbound_nodes": [[["tf.math.multiply_3", 0, 0, {}]]]}], "input_layers": [["input_1", 0, 0], ["input_2", 0, 0]], "output_layers": [["dense_4", 0, 0]]}, "keras_version": "2.4.0", "backend": "tensorflow"}

Hi @MrWangg1992 ,
Could you please provide the imports for aliases like K and other imports as well to reproduce the reported error ?

Also try with latest versions since Tf2.3 is quiet older.

Hi @MrWangg1992 ,
Could you please provide the imports for aliases like K and other imports as well to reproduce the reported error ?

Sure I think this should be all, our current project is based on either 2.3 or 2.4. For the latest version, it may take too much effort to rebuild
from tensorflow.keras.layers import *
from tensorflow.keras.regularizers import l2
import tensorflow as tf
from tensorflow.keras import backend as K
import numpy as np
import tensorflow.keras.layers as layers
import math

from tensorflow.keras.models import model_from_json
import os, shutil, uuid

Hi @MrWangg1992 ,
I am sorry to say that TF2.4v are not supported now. I request you to upgrade to latest version.
From the error stack , the function tensor_not_equals() should be passed with 2 arguments self and other. But during program call tensor_not_equals() received only one argument hence causing the error. It might be bug or may be it arising from the custom_objedct serialization.
Could you please try with latest Tf versions and if issue still persists please submit a colab gist of same.
Thanks!


text:
How to verify that the onednn optimizations are enabled in runtime?

Issue type
Build/Install
Have you reproduced the bug with TensorFlow Nightly?
No
Source
source
TensorFlow version
tf2.9.0
Custom code
No
OS platform and distribution
linux ubuntu20.04
Mobile device
No response
Python version
3.8.10
Bazel version
5.0.0
GCC/compiler version
9.4.0
CUDA/cuDNN version
11.6.2-cudnn8
GPU model and memory
No response
Current behavior?
Expect to see a message beginning with "oneDNN custom operations are on" in my app log in startup phase
Standalone code to reproduce the issue
1. Build tensorflow_cc library with a conanfile
https://gist.github.com/lizhangzhan/8fdc974fc9f8958478196e607de57cb3
2. set TF_ENABLE_ONEDNN_OPTS=1 to start my application to load a graph proto file and build a session to execute in a CPU machine.
3. Unable to a message beginning with "oneDNN custom operations are on" in my app log in startup phase.

Relevant log output
2023-12-06 04:05:32.663256: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /workspace/lib/tensorflow_2.9.0/:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
2023-12-06 04:05:32.663273: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2023-12-06 04:05:32.663291: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (training-worker-0): /proc/driver/nvidia/version does not exist
2023-12-06 04:05:32.663387: I tensorflow/core/common_runtime/process_util.cc:146] Creating new thread pool with default inter op setting: 16. Tune using inter_op_parallelism_threads for best performance.
2023-12-06 04:05:32.704571: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:354] MLIR V1 optimization pass is not enabled

I have verified the log issue.  In build phase, "--config=mkl" option influence the log printing.


text:
tensorflow support sgd with monment Optimizer??

tensorflow support sgd with monment???
is it tf.train.MomentumOptimizer

Yes, tf.train.MomentumOptimizer is the one you're looking for. Please ask on StackOverflow with the tag tensorflow in the future. GitHub is for bugs and feature requests. 😃


text:
beINSports" جائزة قطر الكبرى 2024 مباشر(فورمولا 1)

قبل ٢٣ ساعة — مغامرة قطر في العالم الافتراضي متاحة مجاناً عبر لعبة “لايفتوبيا” الشهيرة حتى 28 فبراير 2025. وتأتي هذه
المبادرة بالتعاون بين منصة كيولايف، ...
سباق جائزة قطر الكبرى للفورمولا 1 29/11-01/12/2024. جائزة قطر الكبرى للفورمولا 1 2024 ... نظرًا لعدم تعاوننا مباشرة
سباق جائزة الخطوط الجوية القطرية الكبرى للفورمولا 1® - قطر 2024 · 29 Nov. مرحلة السباق 1. 4:30 عصراً ــ 5:30 مساءً
سباق جائزة الخطوط الجوية القطرية الكبرى للفورمولا 1® - قطر ...
جائزة قطر الكبرى للفورمولا-1.. الأسترالي بياستري يتوج بلقب سباق السرعة
الدوحة في 30 نوفمبر /قنا/ حقق السائق الأسترالي أوسكار بياستري لقب سباق السرعة "سبرينت" مساء اليوم ضمن منافسات سباق جائزة قطر الكبرى للخطوط الجوية القطرية للفورمولا 1 – "قطر 2024"، الذي يشكل الجولة الثالثة والعشرين من البطولة العالمية الأكبر والأشهر لسباقات السيارات، التي تستضيفها الدوحة على حلبة لوسيل الدولية تحت الأضواء الكاشفة، على مدار ثلاثة أيام.
وجاء تتويج بياستري سائق فريق "مكلارين" باللقب إثر احتلاله المركز الأول بعدما قطع مسافة السباق المكون من 19 لفة ولمسافة 102.22 كيلومترا في زمن قدره 27:03.010 دقيقة.
وتعد هذه هي المرة الثانية التي يتوج بها السائق الأسترالي بسباق السرعة "سبرينت" في قطر بعدما فاز به العام الماضي عندما أقيمت للمرة الأولى، حيث سجل زمنا قدره 35.01.297 دقيقة، متفوقا بفارق 1.871 ثانية على الهولندي ماكس فيرستابن سائق فريق "ريد بول" الذي حل ثانيا، وحسم لقبه الثالث العالمي وقتها.
وتفوق بياستري هذا الموسم بفارق 0.136 ثانية عن أقرب منافسيه الإنجليزي لاندو نوريس زميله في فريق "مكلارين"، صاحب المركز الثاني بزمن قدره 27:03.146 دقيقة.
واحتل البريطاني جورج راسل سائق فريق "مرسيدس" المركز الثالث بزمن قدره 27:03.420 دقيقة، فيما حل الإسباني كارلوس ساينز الابن سائق فريق "فيراري" في المركز الرابع بزمن قدره 27:04.336 دقيقة، بينما أكمل شارل لوكير من موناكو سائق فريق "فيراري"، قائمة المراكز الخمسة الأولى بزمن قدره 27:08.083 دقيقة.
وحصل السائقون البريطاني لويس هاميلتون بطل العالم سبع مرات، وسائق فريق "مرسيدس"، والألماني نيكو هلكنبرج سائق فريق "هاس"، والهولندي ماكس فيرستابن الذي حسم لقبه العالمي الرابع تواليا، سائق فريق "ريد بول"، والفرنسي بيير جاسلي سائق فريق "ألبين"، والدانماركي كيفن ماجنوسن سائق فريق "هاس الأخر"، على المراكز من السادس حتى العاشر على الترتيب.
وجاء سباق السرعة "سبرينت" قويا وتنافسيا منذ البداية، حيث سيطر بياستري ونوريس ثنائي فريق مكلارين على مجريات السباق منذ البداية، بعدما قدما انطلاقة قوية وهو ما سمح لهما بضمان المركزين الأول والثاني.
وبعدما حسم الهولندي فيرستابن لقبه العالمي الرابع قبل جولتين على النهاية برصيد 404 نقاط في المركز الأول، عزز الإنجليزي نوريس موقعه في المركز الثاني في الترتيب العام بعدما حصد 6 نقاط في سباق السرعة "سبرينت" ورفع رصيده إلى347 نقطة وبفارق 24 نقطة عن شارل لوكير من موناكو سائق فريق "فيراري" صاحب المركز الثالث.
ومن المقرر أن ينطلق السباق الرئيسي مساء يوم غد "الأحد" في السابعة مساء على حلب لوسيل الدولية، حيث يتطلع نوريس لتحقيق فوز يضمن له المركز الثاني قبل الجولة الأخيرة من بطولة العالم في أبوظبي.

SS
### ✅🟢 LIVE STREAM PLAY NOW
✅🟢 HERE PLAY NOW ONLINE
.
.
.
.
.
.
.
.
.
.
..
### ✅🟢 LIVE STREAM PLAY NOW
✅🟢 HERE PLAY NOW ONLINE
.
.
.
.
.
.
.
.
SS
### ✅🟢 LIVE STREAM PLAY NOW
✅🟢 HERE PLAY NOW ONLINE
.
.
.
.
.
.
.
.
.
.
..
### ✅🟢 LIVE STREAM PLAY NOW
✅🟢 HERE PLAY NOW ONLINE
.
.
.
.
.
.
.
.
SS
### ✅🟢 LIVE STREAM PLAY NOW
✅🟢 HERE PLAY NOW ONLINE
.
.
.
.
.
.
.
.
.
.
..
### ✅🟢 LIVE STREAM PLAY NOW
✅🟢 HERE PLAY NOW ONLINE
.
.
.
.
.
.
.
.
SS
### ✅🟢 LIVE STREAM PLAY NOW
✅🟢 HERE PLAY NOW ONLINE
.
.
.
.
.
.
.
.
.
.
..
### ✅🟢 LIVE STREAM PLAY NOW
✅🟢 HERE PLAY NOW ONLINE
.
.
.
.
.
.
.
.
cvcv

authors: fotiksori semolisk


text:
Update model_fn.py

Remove and replace contrib framework and function

Can one of the admins verify this patch?

@ispirmustafa any opinion here?

@ispirmustafa ping
Jenkins, test this please

@drpngx @ispirmustafa @sb2nov do these changes look good?

@drpngx @ispirmustafa @sb2nov what is the check on "Ubuntu CC" mean?

It's one of our tests, somehow it is stuck
Jenkins, test this please.

Jenkins, test this please.

@drpngx do these changes look good to you? I am not sure why the changes are failing all of the internal builds which I find is weird since the functions I replace should be equivalent.

@gunan it might be one of these cases where some failure happened.

Jenkins, test this please

Could you check if that is related to the PR?
FAIL: //tensorflow/core:lib_monitoring_sampler_test (see /tmpfs/tmp/bazel/execroot/org_tensorflow/bazel-out/k8-opt/testlogs/tensorflow/core/lib_monitoring_sampler_test/test.log)
INFO: From Testing //tensorflow/core:lib_monitoring_sampler_test:
Traceback (most recent call last):
  File ".asci-reserved/run_docker.py", line 568, in <module>
    main()
  File ".asci-reserved/run_docker.py", line 544, in main
    cmd = setup_and_generate_command(sys.argv[1:])
  File ".asci-reserved/run_docker.py", line 145, in setup_and_generate_command
    pull_spec_if_necessary(img_spec)
  File ".asci-reserved/run_docker.py", line 206, in pull_spec_if_necessary
    if has_spec(img_spec):
  File ".asci-reserved/run_docker.py", line 234, in has_spec
    return spec.digest in listing.split()
AttributeError: 'NoneType' object has no attribute 'split'

@drpngx I think I managed to find what was wrong. The deprecated import seems to called everything from framework via contrib_framework, but if I replace that import with a non-deprecated version, that causes an import collision since all framework calls uses the non-deprecated version. To make sure, when contributing to the TF project, should I be making a broad import calls like from tensorflow.python.framework import framework_lib or smaller calls like from tensorflow.python.framework import sparse_tensor?

Jenkins, test this please.

source: gharchive/pull-request

authors: alanyee drpngx gunan sb2nov tensorflow-jenkins


text:
r2.2-rc1 cherry-pick request: [Intel MKL] Fix performance regression in DNNL 1

Fix performance regression in DNNL 1 due to lack of primitive cache on reorder. This only affects TF-MKL and not stock TF.

@guizili0 Could you please post @googlebot I consent.?

@googlebot I consent.


text:
make bazel build work on aarch64/arm linux

make
bazel build //tensorflow/tools/pip_package:build_pip_package

work again on aarch64 (e.g., EdgeTPU Dev board and Jetson boards)
and arm (e.g, Raspberry Pi 3/4 boards) Linux platforms
without this patch, I saw
...
ERROR: While resolving toolchains for target //tensorflow:libtensorflow_framework.so.2.1.0: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.

Please add this, I want to compile tensorflow on my raspberry pi 4.

authors: Titaniumtown freedomtan