行'trainX=loaded[16:].reforme((602,256,256,1)).astype的含义是什么(第32页)'?

2024-04-24 06:42:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我和胶囊网络合作。Here是我正在引用的代码。你知道吗

我正在使用自己的训练图像602数据集。图像的维数是256x256灰度图像。你知道吗

我不明白主文件中特定行的含义

trainX = loaded[16:].reshape((602, 256, 256, 1)).astype(np.float32)

因为这个,我犯了个错误

ValueError: cannot reshape array of size 12058624 into shape (602,256,256,1)

有谁能帮我摆脱困境吗。非常感谢。你知道吗


Tags: 文件数据代码图像网络herenp灰度