Commit 6fdd8b1
authored
Update introyt model tutorial APIs (#3895)
Fixes #3856
## Description
Updates the Building Models tutorial to use the current PyTorch API
style:
- specifies `dim=1` for the `TinyModel` softmax layer
- replaces Python 2-style `super(...)` calls with `super().__init__()`
## Verification
- [x] `python3 -m py_compile
beginner_source/introyt/modelsyt_tutorial.py`
- [x] `MPLBACKEND=Agg /tmp/docathon-torch-venv/bin/python
beginner_source/introyt/modelsyt_tutorial.py`
## Checklist
- [x] The issue that is being fixed is referred in the description
- [x] Only one issue is addressed in this pull request
- [x] Labels from the issue that this PR is fixing are added to this
pull request
- [x] No unnecessary issues are included into this pull request.
cc @subramen1 parent 046a3f3 commit 6fdd8b1
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
0 commit comments