Answers for "keras classification losses"

0

how to set learning rate in keras

opt = keras.optimizers.Adam(learning_rate=0.01)
model.compile(loss='categorical_crossentropy', optimizer=opt)
Posted by: Guest on January-23-2021
0

Plotting keras model trainning history

history = model.fit()
print(history.history.keys())

import matplotlib.pylab as plt
from matplotlib.pyplot import figure
figure(figsize=(8, 6))
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()
Posted by: Guest on January-22-2021

Code answers related to "keras classification losses"

Python Answers by Framework

Browse Popular Code Answers by Language