我在一个图像数组中有一些真实图像,而在另一个图像数组中有一些虚假图像。我想附加两个numpy图像阵列来训练我的CNN模型。但是np.concatenate
产生错误only integer scalar arrays can be converted to a scalar index
我的真实图像阵列的形状为(30938,3,112,112),我的假图像阵列的形状为(11372,3,112,112),其中每个图像的形状为(3,112,112)
我已经尝试过了
combined=np.concatenate(real,fake,axis=0)
哪里有问题?
最佳答案
只有一个错误
combined=np.concatenate((real,fake),axis=0)
关于python - 连接两个Numpy图像数组时出现问题。引发错误 “only integer scalar arrays can be converted to a scalar index”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56703707/