【发布时间】:2023-02-15 16:02:31
【问题描述】:
我正在尝试将一组 3D 张量(图像)转换为单个 4D 张量,因此我可以将它们作为值传递给 model.fit,它似乎不接受 Tensor3D 数组。
这个想法是
4dTensor = tf.tensor4d(batch)
我实际上使用的是 javascript,但 python 或 js 解决方案可能会起作用,因为 Tensorflow API 是相似的。
这个程序的错误是:
Argument of type 'Tensor4D' is not assignable to parameter of type 'Tensor3D[]'.
Type 'Tensor<Rank.R4>' is missing the following properties from type 'Tensor3D[]': length, pop, push, join, and 26 more.ts(2345)
【问题讨论】:
标签: python tensorflow