This error typically occurs in TensorFlow when you try to access the 'tensor_shape' attribute of a 'Tensor' object, but the attribute does not exist.

One possible reason for this error is that you are using an older version of TensorFlow that does not have the 'tensor_shape' attribute. In older versions of TensorFlow, you may need to use the 'get_shape()' method instead.

Another possible reason for this error is that you are trying to access the 'tensor_shape' attribute of a 'Tensor' object that is not fully defined yet. In TensorFlow, 'Tensor' objects are not fully evaluated until you run them through a session. If you try to access the 'tensor_shape' attribute before the 'Tensor' object is fully evaluated, you may get this error.

To fix this error, make sure you are using the correct version of TensorFlow and try evaluating the 'Tensor' object before accessing its 'tensor_shape' attribute.

TensorFlow AttributeError: 'Tensor' object has no attribute 'tensor_shape'

原文地址: https://www.cveoy.top/t/topic/jscJ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录