What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-10 05:14:07
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('los... Add solution -
Python 2021-09-09 22:35:02
change each line color as a rainbow python
from matplotlib.pyplot import cm import numpy as np #variable n below should be number of curves to plot #version 1: color=cm.rainbow(np.linspace(0,1,n)) for i,c in zip(range(n),color): plt.plot(x, y,c=c) #or version 2: color=iter(cm.rainbow(np.li... Add solution