使用
tf.zeros
初始化大小为 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"
images = tf.zeros(shape=[10, 256, 256, 3])
这是作业,对吧?