mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
Merge pull request #76 from aronvandepol/patch-2
Update 05_pytorch_going_modular.md
This commit is contained in:
1 file changed
+2
-2
@@ -392,7 +392,7 @@ class TinyVGG(nn.Module):
|
||||
x = self.conv_block_2(x)
|
||||
x = self.classifier(x)
|
||||
return x
|
||||
# return self.classifier(self.block_2(self.block_1(x))) # <- leverage the benefits of operator fusion
|
||||
# return self.classifier(self.conv_block_2(self.conv_block_1(x))) # <- leverage the benefits of operator fusion
|
||||
```
|
||||
|
||||
Now instead of coding the TinyVGG model from scratch every time, we can import it using:
|
||||
@@ -831,4 +831,4 @@ python train.py --model MODEL_NAME --batch_size BATCH_SIZE --lr LEARNING_RATE --
|
||||
|
||||
* To learn more about structuring a Python project, check out Real Python's guide on [Python Application Layouts](https://realpython.com/python-application-layouts/).
|
||||
* For ideas on styling your PyTorch code, check out the [PyTorch style guide by Igor Susmelj](https://github.com/IgorSusmelj/pytorch-styleguide#recommended-code-structure-for-training-your-model) (much of styling in this chapter is based off this guide + various similar PyTorch repositories).
|
||||
* For an example `train.py` script and various other PyTorch scripts written by the PyTorch team to train state-of-the-art image classification models, check out their [`classification` repository on GitHub](https://github.com/pytorch/vision/tree/main/references/classification).
|
||||
* For an example `train.py` script and various other PyTorch scripts written by the PyTorch team to train state-of-the-art image classification models, check out their [`classification` repository on GitHub](https://github.com/pytorch/vision/tree/main/references/classification).
|
||||
Reference in new issue
Block a user