回答編集履歴

1

2018/10/04 02:20

投稿

tiitoi
tiitoi

スコア21956

test CHANGED
@@ -1,4 +1,8 @@
1
- [ModelCheckpoint](https://keras.io/ja/callbacks/#modelcheckpoint) できます。
1
+ [ModelCheckpoint](https://keras.io/ja/callbacks/#modelcheckpoint) を fit() 関数に渡してあげるとできます。
2
+
3
+
4
+
5
+ ## サンプルコード
2
6
 
3
7
 
4
8
 
@@ -88,7 +92,7 @@
88
92
 
89
93
  model_checkpoint = ModelCheckpoint(
90
94
 
91
- filepath=os.path.join('models', 'weights.{epoch:02d}-{val_loss:.2f}.h5'),
95
+ filepath=os.path.join('models', 'model_{epoch:02d}_{val_loss:.2f}.h5'),
92
96
 
93
97
  monitor='val_loss',
94
98
 
@@ -112,25 +116,25 @@
112
116
 
113
117
  models
114
118
 
115
- |-- weights.01-0.50.h5
119
+ |-- model_01_0.52.h5
116
120
 
117
- |-- weights.02-0.34.h5
121
+ |-- model_02_0.35.h5
118
122
 
119
- |-- weights.03-0.29.h5
123
+ |-- model_03_0.29.h5
120
124
 
121
- |-- weights.04-0.27.h5
125
+ |-- model_04_0.26.h5
122
126
 
123
- |-- weights.05-0.25.h5
127
+ |-- model_05_0.25.h5
124
128
 
125
- |-- weights.06-0.24.h5
129
+ |-- model_06_0.23.h5
126
130
 
127
- |-- weights.07-0.24.h5
131
+ |-- model_07_0.23.h5
128
132
 
129
- |-- weights.08-0.24.h5
133
+ |-- model_08_0.22.h5
130
134
 
131
- |-- weights.09-0.23.h5
135
+ |-- model_09_0.22.h5
132
136
 
133
- `-- weights.10-0.22.h5
137
+ `-- model_10_0.22.h5
134
138
 
135
139
 
136
140