ユーザ用ツール

サイト用ツール


プログラム:python

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
プログラム:python [2025/02/06 05:46]
kawaue [文法]
プログラム:python [2025/08/14 09:23] (現在)
kawaue
行 181: 行 181:
  
 a=value of each bin, b=bin a=value of each bin, b=bin
 +
 +====2軸plot====
 +<code>
 +run_index = 0
 +fig, ax1 = plt.subplots()
 +ax2 = ax1.twinx()
 +ax2.plot(histories2[run_index].history['lr'],label='learning rate',linestyle='--',color='green')
 +ax1.plot(histories2[run_index].history['loss'],label='training loss')
 +ax1.plot(histories2[run_index].history['val_loss'],label='validation loss')
 +plt.title('1st iteration, step 1, batch : 8192 lr : 1e-6, 1st trials')
 +ax1.set_xlabel('epoch')
 +ax1.set_ylabel('Loss')
 +ax2.set_ylabel('Learning Rate')
 +handler1, label1 = ax1.get_legend_handles_labels()
 +handler2, label2 = ax2.get_legend_handles_labels()
 +ax1.legend(handler1 + handler2, label1 + label2)
 +#plt.legend()
 +plt.figure()
 +</code>
 +
 ====機械学習==== ====機械学習====
 ===tensorflow=== ===tensorflow===
プログラム/python.txt · 最終更新: 2025/08/14 09:23 by kawaue