我正在研究神经网络,当我尝试对两个 numpy.ndarray 进行混洗时,出现此错误。我尝试重新检查 shuffle 函数格式,但找不到任何错误。请帮忙
train_images,train_labels = shuffle(train_images,train_labels)
TypeError
Traceback (most recent call last)
<ipython-input-8-b3f4173331ac> in <module>
18 print("Training the Network")
19 for i in range(epoch):
20 --> train_images,train_labels = shuffle(train_images,train_labels)
21 for offset in range (0,no_eg,batch_size):
22 end = offset+batch_size
/usr/lib/python3.5/random.py in shuffle(self, x, random)
275 for i in reversed(range(1, len(x))):
276 # pick an element in x[:i+1] with which to exchange x[i]
277 --> j = _int(random() * (i+1))
278 x[i], x[j] = x[j], x[i]
279
TypeError: 'numpy.ndarray' object is not callabl
慕村225694
千万里不及你
相关分类