1

plot_history_comparison.py

 2 years ago
source link: https://gist.github.com/zjwarnes/6e2a5e419bab4cb04da595537ee5b481
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

plot_history_comparison.py · GitHub

Instantly share code, notes, and snippets.

import plotly.graph_objects as go from plotly.subplots import make_subplots

def plot_histories(histories, epochs, sub_titles, title): fig = go.Figure() for idx, hist in enumerate(histories): fig.add_trace( go.Scatter( x = list(range(epochs)),y = hist.history['val_loss'], name = sub_titles[idx] + ' Validation' )) fig.update_layout( title='Validation Loss with ' + title + ' Activation', title_x=0.5, yaxis_title='Loss', xaxis_title='Epochs', height=800, yaxis = dict(range = [0.0,0.2]), yaxis2 = dict(range = [0.0,0.2]), yaxis3 = dict(range = [0.0,0.2]), yaxis4 = dict(range = [0.0,0.2]) ) return fig


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK