Keras model fits for creating squares in Jupyter notebook edition
I am using Keras 2.0.2 with TensorFlow like:
I am running a simple model:
from keras.layers.core import Lambda, Flatten, Dense
from keras.models import Sequential
from keras.optimizers import Adam
model = Sequential([
Lambda(norm_inp, input_shape=(1, 28, 28)),
Flatten(),
Dense(10, activation="softmax")
])
model.compile(optimizer=Adam(), loss='categorical_crossentropy', metrics=['accuracy'])
def run_fit(model, lr = 0.0001, epochs = 1):
model.optimizer.lr = lr
model.fit(x_train_processed, y_train_processed, epochs=epochs, verbose=1,
validation_data=(x_test_processed, y_test_processed))
run_fit(model, 0.0001, 1)
But when I run this in Jupyter I get squares in the output.
I tried to find this, but I couldn't find anything suitable.
+3
source to share