Я очень плохо знаком с Python.Я получаю следующую ошибку индекса:
Traceback (most recent call last): File "Pride.py", line 109, in <module>
plt.imshow(X_train[i,0], interpolation='nearest')
IndexError: index 100 is out of bounds for axis 0 with size 8
Вот код:
print('X_train shape:', X_train.shape)
print(X_train.shape[0], 'train samples')
print(X_test.shape[0], 'test samples')
# convert class vectors to binary class matrices
Y_train = np_utils.to_categorical(y_train, nb_classes)
Y_test = np_utils.to_categorical(y_test, nb_classes)
i = 100
plt.imshow(X_train[i,0], interpolation='nearest')
print("label : ", Y_train[i,:])
Я был бы признателен за некоторую помощь, поскольку я очень запутался.