使用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"
1条答案
按热度按时间djmepvbi1#
这是家庭作业对吧