19.05.2019 · tf.make_ndarray() throws an AttributeError: 'Tensor' object has no attribute 'tensor_shape' #28840 Closed EmielBoss opened this issue May 19, 2019 · 17 comments
05.10.2020 · I am trying to write a program for MNIST Digit Recognition. I am taking help from this link Kaggle Link. When I am training my model it is showing AttributeError: 'Tensor' object has no attribute 'train_img' I am getti…
25.07.2018 · I have noticed this can happen if you mix up regular keras imports and tensorflow imports. Avoid mixing imports like this: # Mixed imports, one is regular keras, other is TF's keras import keras from tensorflow.keras.model import Model sequence_input = keras.layers.Input(shape=(MAX_SEQUENCE_LENGTH,), dtype='int32') ... model = …
You should use the Tensor.get_shape () method instead: train_data = tf.reshape (train_data, [400, 1]) print "train_data.shape: " + str (train_data.get_shape ()) Note that in general you might not be able to get the actual shape of the result of a TensorFlow operation. In some cases, the shape will be a computed value that depends on running the ...
I have a variable called samples and when I do type(samples) it gives me <class 'util.misc.NestedTensor'>. when I print it, it looks like a normal tensor, ...
Hi everybody! I'm using tensorflow 2.3 and I'm having an issue when i try to call a function that returns a keras.Model . AttributeError: 'Tensor' object has no attribute 'numpy' Tensorflow 2.3
tf.make_ndarray is used to convert TensorProto values into NumPy arrays, not tf.Tensor objects. These values are generally the constants used in a graph. For example, in graph mode, when you use tf.constant, you create a Const operation with an attribute value holding the constant value that the operation will produce. That attribute is stored as a TensorProto.