回答編集履歴
1
historyを保存する内容を追記しました。
answer
CHANGED
@@ -6,4 +6,30 @@
|
|
6
6
|
|
7
7
|
pickleのエラーを解消する方法を調べようと思ったら、このページの関連した質問に同じような内容がありました。
|
8
8
|
|
9
|
-
---
|
9
|
+
---
|
10
|
+
|
11
|
+
追記です。
|
12
|
+
|
13
|
+
historyは辞書らしいですので、モデル自体とは違って(pickle.dumpも使える?)、次の引用にある方法で保存することができるみたいです。
|
14
|
+
|
15
|
+
> ```py
|
16
|
+
> history = model.fit(...)
|
17
|
+
> with open('/trainHistoryDict', 'wb') as file_pi:
|
18
|
+
> pickle.dump(history.history, file_pi)
|
19
|
+
> ```
|
20
|
+
>
|
21
|
+
> https://stackoverflow.com/questions/41061457/keras-how-to-save-the-training-history-attribute-of-the-history-object
|
22
|
+
|
23
|
+
.
|
24
|
+
|
25
|
+
> ```py
|
26
|
+
> history = model.fit(...)
|
27
|
+
> hist_df = pd.DataFrame(history.history)
|
28
|
+
> hist_df.to_csv('history.csv')
|
29
|
+
> ```
|
30
|
+
>
|
31
|
+
> https://cocoinit23.com/keras-model-fit-history-pandas-plot/
|
32
|
+
|
33
|
+
こちらも参考になりそうでしょうか。
|
34
|
+
例: 損失の履歴を記録する
|
35
|
+
https://keras.io/ja/callbacks/#history
|