state = stateview-1 1 4 4todevice如何打印state的维度
可以使用print函数打印state的维度,代码如下:
print(state.shape)
其中,state.shape表示state的维度信息。输出结果为:
torch.Size([batch_size, channels, height, width])
其中,batch_size=1,channels=1,height=4,width=4。
原文地址: https://www.cveoy.top/t/topic/bCk9 著作权归作者所有。请勿转载和采集!