Category : eager-execution

I am trying to write a function which is a part of tfx (Tensorflow Extended) Transform component. I want to use some tf.Transform module (note its something different than tfx Transform component) functions inside. This is my first time with Tensoflow, so I’d love to debug and see the result of each line of code ..

Read more

I have built a custom keras model and during its forward pass, it uses the output of a function from another library. However, the parameter to this function must be a numpy array. During model.compile() I can set the run_eagerly parameter to True, then I can convert the output from forward pass to numpy by ..

Read more

I need to compute tf.Variable gradients in a class method, but use those gradients to update the variables at a later time, in a different method. I can do this when not using the @tf.function decorator, but I get the TypeError: An op outside of the function building code is being passed a "Graph" tensor ..

Read more

I’m getting the error AttributeError: ‘Tensor’ object has no attribute ‘numpy’ when trying to change a tf tensor to a numpy array and then back to a tensor. The code giving me the error is as follow. network = models.Sequential() network.add(layers.Dense(512,activation=’relu’)) network.add(layers.Dense(10,activation=’linear’)) def root_mean_squared_error(y_true, y_pred): y_pred = y_pred.numpy() y_pred = tf.convert_to_tensor(y_pred) return K.sqrt(K.mean(K.square(y_pred – y_true))) ..

Read more

I am playing around with TensorFlow, and I am trying to export a Keras Model as a TensorFlow Model. And I ran into the above-mentioned error. I am following the “Build Deep Learning Applications with Keras 2.0” from Lynda (https://www.linkedin.com/learning/building-deep-learning-applications-with-keras-2-0/exporting-google-cloud-compatible-models?u=42751868) While trying to build a tensor flow model, I came across this error, thrown at ..

Read more