()
| 145 | |
| 146 | |
| 147 | def get_config(): |
| 148 | data_train = get_data('train') |
| 149 | data_test = get_data('val') |
| 150 | |
| 151 | return TrainConfig( |
| 152 | dataflow=data_train, |
| 153 | callbacks=[ |
| 154 | ModelSaver(), |
| 155 | ScheduledHyperParamSetter( |
| 156 | 'learning_rate', [(60, 4e-5), (75, 8e-6)]), |
| 157 | InferenceRunner(data_test, |
| 158 | [ClassificationError('wrong-top1', 'val-error-top1'), |
| 159 | ClassificationError('wrong-top5', 'val-error-top5')]) |
| 160 | ], |
| 161 | model=Model(), |
| 162 | steps_per_epoch=1280000 // TOTAL_BATCH_SIZE, |
| 163 | max_epoch=90, |
| 164 | ) |
| 165 | |
| 166 | |
| 167 | def run_image(model, sess_init, inputs): |
no test coverage detected
searching dependent graphs…