Closed Ruiyuan-Zhang closed 2 years ago
@zju-zry after Tensorflow 3.x, if you are only importing tfjs-core, the chain ops (i.e. tensor.add) for tensors has been removed. This allows to greatly reduce the bundle size. You can only use tf.add() method now.
okay, thanks for your answer.
在微信小程序中无法使用tensor.add() 或者是 .mul() 等一系列函数,只能使用tf.add()或者是tf.mul()等函数代替。 不知道 这个是为什么?
let x = tf.tensor([1,2,3]) x.pow(tf.scalar(3)) // 会显示没有pow()函数而报错 tf.pow(x,tf.scalar(3))//这样就不会出错