如何解决此问题?
def random_mini_batches(train_inputs, train_targets, mini_batch_size = 64, seed = 0):
m = 17000
mini_batches = []
np.random.seed(seed)
permutation = list(np.random.permutation(m))
shuffled_X = train_inputs[:, permutation]
shuffled_Y = train_targets[:, permutation].reshape((10,m))
错误:
/home/kkkk/Desktop/ in random_mini_batches(X, Y, mini_batch_size, seed)
m = 17000
mini_batches = []
np.random.seed(seed)
49 permutation = list(np.random.permutation(m))
---> 50 shuffled_X = train_inputs[:, permutation]
51 shuffled_Y = train_targets[:, permutation].reshape((10,m))
52
IndexError: too many indices for array
这与shuffled_X和shuffled_Y的维度有关吗?