[英]understanding the size and structure of multi-dimensional array
元组(如Python列表)具有len
属性
len(batch) # probably gives 2
您可以通过迭代查看元组元素的属性
for arr in batch:
print(arr.shape)
print(arr.dtype)
要么
[arr.shape for arr in batch]
要么
batch[0].shape
batch[1].shape
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.