Category : tensorflow1.15

I am creating a tf.keras.model which is compiled with a custom loss and a custom metrics function. I call train_on_batch on model using x=input_batch and y=someFunction(targets) The signature of custom loss and custom metrics functions looks like methodname(y_true,y_pred) Here y_true is fed with someFunction(targets) Is there any way to get targets in custom metrics function ..

Read more

I am trying to create checkpoints of the tensors created by the following function, but I am having a rough time (Tensorflow 1.x). Pickle does not work. def _create_discriminator(self, x, train=True, reuse=False, name="discriminator"): with tf.variable_scope(name) as scope: if reuse: scope.reuse_variables() h = x for i in range(self.num_conv_layers): h = lrelu(batch_norm(conv2d(h, self.num_dis_feature_maps * (2 ** i), ..

Read more

since my GPU only support TensorFlow 2.x, I have to rewrite a code which is written in TensorFlow 1.x . I used the following code: https://www.tensorflow.org/guide/upgrade Everything worked fine until I came to the following function: tf.contrib.training.bucket_by_sequence_length(input_length, tensors, batch_size, bucket_boundaries, num_threads=1, capacity=32, bucket_capacities=None, shapes=None, dynamic_pad=False, allow_smaller_final_batch=False, keep_input=True, shared_name=None, name=None) Unfortunately therefore I haven’t a solution ..

Read more

I installed TensorFlow using mayapy pip install tensorflow I then tried import tensorflow as tf, but Maya crashes on this call: _mod = imp.load_module(‘_pywrap_tensorflow_internal’, fp, pathname, description) Full crash log: https://pastebin.com/yVimvEJa Am I missing any library? Tested on: Python: 2.7 Maya 2020 Linux CentOS7 Tensorflow 1.14 Source: Python..

Read more

So guys, I am using tensorflow==1.15.0 and python==3.7.10. I can’t upgrade to tensorflow==2.X because I am working upon the code which has been written in 1.X version. So, here is the complete Error:- Type of the model_obj: <class ‘CustomAutoencoder_tf21s.AutoEncoderModel’> Type of test_norm: <class ‘numpy.ndarray’> The test_norm is [[-0.8249858 -1.89925946 -0.19963089 -0.72175069 -0.08146654 0.17114502 -0.78429501 -0.41983836 ..

Read more