Я пытаюсь настроить глубокие нейронные сети, используя Keras.
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (12.0, 9.0)
idx = 2 # image index that you want to display
img = np.empty(3, dtype=object)
img[0] = X[idx]
img[1] = Y[idx].reshape(Y[idx].shape[0],Y[idx].shape[1])
img[2] = pred[idx].reshape(pred[idx].shape[0],pred[idx].shape[1])
title = ['input', 'ground-truth', 'result']
for i in range(3):
plt.subplot(1, 3, i+1)
if i==0:
plt.imshow(img[i].astype('uint8'))
else:
plt.imshow(img[i], cmap='gray')
plt.axis('off')
plt.title(title[i])
plt.show()
полный код находится в этой ссылке colab , которая хорошо работает на colab.

один и тот же код ничего не дает (результат) в моей локальной среде.

любая подсказка будет оценена.