📜  如何展平图像数据集 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:15.298000             🧑  作者: Mango

代码示例1
# Reshape the training and test examples 
train_x_flatten = train_x_orig.reshape(train_x_orig.shape[0], -1).T   # The "-1" makes reshape flatten the remaining dimensions
test_x_flatten = test_x_orig.reshape(test_x_orig.shape[0], -1).T