Created by: qingqing01
- 更改目录结构:
|-- examples
|-- hapi
| `-- tests
- 增加Fit接口 @xiangyang 讨论,觉得callback复杂,提了一个无callback,在接口设置打印log和保存模型的接口,只能处理最简单的场景。复杂场景没有callback无法处理。
def fit(
self,
train_iterator=None,
eval_iterator=None,
eval_freq=1,
epochs=1,
device=None,
log_step=10,
save_freq=1,
save_filepath='output',
verbose=2, ):
默认打印Log:
Epoch 0/1
step 0 - loss: 2.2957 - 0s/step - elapsed 4s
step 10 - loss: 0.6539 - 437ms/step - elapsed 4s
step 20 - loss: 0.4263 - 223ms/step - elapsed 4s
step 30 - loss: 0.2812 - 152ms/step - elapsed 5s
step 40 - loss: 0.2512 - 116ms/step - elapsed 5s
step 50 - loss: 0.2515 - 95ms/step - elapsed 5s
...