Skip to content

Commit

Permalink
qwe
Browse files Browse the repository at this point in the history
  • Loading branch information
3017218062 committed Dec 6, 2020
1 parent 478f9a2 commit 831ca41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytorch-lightning入门到精通(1).md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
model = CustomModel()
```

- 定义进度条和学习曲线
- 定义进度条和学习曲线(我不喜欢官方的进度条,所以自己写了一个)

```python
class FlexibleTqdm(Callback):
Expand Down Expand Up @@ -263,7 +263,7 @@
plt.show()
```

- 设置训练参数
- 设置训练参数(我不喜欢用logger,所以全关闭了)

```python
trainer_params = {
Expand All @@ -274,7 +274,7 @@
"progress_bar_refresh_rate": 0, # 1
"num_sanity_val_steps": 0, # 2
"callbacks": [
FlexibleTqdm(len(train_dataset) // batch_size, column_width=12),
FlexibleTqdm(len(train_dataset) // batch_size, column_width=12), # 注意设置progress_bar_refresh_rate=0,取消自带的进度条
LearningCurve(figsize=(12, 4), names=("loss", "acc", "f1")),
], # None
}
Expand Down

0 comments on commit 831ca41

Please sign in to comment.