[英]TypeError: tf.shape is not a function
I am trying to convert some python tensorflow code to javascript.我正在尝试将一些 python tensorflow 代码转换为 javascript。 tensorflow js has no attribute shape like tensorflow.
tensorflow js 没有像 tensorflow 这样的属性形状。 Is there a way to convert this line of code?
有没有办法转换这行代码? module 'tensorflowjs' has no attribute 'shape'
模块“tensorflowjs”没有属性“形状”
import tensorflowjs as tfjs
input_shape = [1, 1, 256]
tfjs.shape(input_shape)
AttributeError: module 'tensorflowjs' has no attribute 'shape'
AttributeError:模块“tensorflowjs”没有属性“shape”
shape
is second attribute for create tensor function. shape
是创建张量 function 的第二个属性。
tf.tensor (values, shape?, dtype?)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.