TensorFlow四维Tensor

q35jwt9p  于 2023-03-24  发布在  其他
关注(0)|答案(1)|浏览(135)

使用tf.zeros初始化一个4维零Tensor,大小为10 x 256 x 256 x 3。

images =  # TODO

assert isinstance(images, tf.Tensor), "matrix must be a tf Tensor object"
assert tf.rank(images).numpy() == 4, "matrix must be of rank 4"
assert tf.shape(images).numpy().tolist() == [10, 256, 256, 3], "matrix is incorrect shape"
djmepvbi

djmepvbi1#

images = tf.zeros(shape=[10, 256, 256, 3])

这是家庭作业对吧

相关问题