print("Execution time to fit 100 epochs: %s seconds" % (end_time[8] - start_time[8]))
Execution time to fit 100 epochs: 457.7905173301697 seconds
fig, (ax1, ax2) = plt.subplots(1, 2, sharey=True, figsize=(16, 5))
nn_plot(hist[5], 100, subplot=ax1, loss=True, title="Reference: minibatch 64 samples / eta = 0.025")
nn_plot(hist[12], 100, subplot=ax2, loss=True, title="minibatch 32 samples / eta = 0.050")
fig, (ax1, ax2) = plt.subplots(1, 2, sharey=True, figsize=(16, 5))
nn_plot(hist[5], 100, subplot=ax1, acc=True, title="Reference: minibatch 64 samples / eta = 0.025")
nn_plot(hist[12], 100, subplot=ax2, acc=True, title="minibatch 32 samples / eta = 0.050")
model.append(tf.keras.models.Sequential([
tf.keras.layers.Dense(30, kernel_regularizer=tf.keras.regularizers.l2(0.01),
activation=tf.nn.sigmoid, input_shape=(784,), name='hidden_1_layer'),
tf.keras.layers.Dense(10, activation='softmax', name='output_layer')
]))
nn_compile(model[-1], params[5])