我想把这个numpy images数组的顺序改为channel_last 培训数据:(2387,1350,350)至(2387350350,1) 验证数据:(298,1350,350)到(298350,350,1) 测试数据:(301,1350,350)到(301,350,350,1)
我试过了,但没用
np.rollaxis(training_data,0,3).shape
np.rollaxis(validation_data,0,3).shape
np.rollaxis(testing_data,0,3).shape
您需要这样的
np.transpose
方法:其他的也一样
如果要移动的轴的长度为
1
,则简单的重塑即可:相关问题 更多 >
编程相关推荐