You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
930 B
Markdown
20 lines
930 B
Markdown
# Things I have learned about PyTorch and Neural networks.
|
|
|
|
## Building models
|
|
All model building in Pytorch is based on the following three steps
|
|
1. start by creating an object that extends the nn.Module base class
|
|
1. define layers as class attributes (sequential wrapper for ease of use)
|
|
2. implement the `.forward()` method
|
|
|
|
Each layer is just a predefined 'function'.
|
|
Really, they are objects that extend the nn.Module base class.
|
|
Thus each NN can act as a layer in another NN.
|
|
For example, I reimplemented an upscaling layer in BasicNeuralNet2.
|
|
(I picked up a lot of this info here.)[https://deeplizard.com/learn/video/k4jY9L8H89U]
|
|
|
|
|
|
Also, neural networks can return more than just a single output as long as the
|
|
loss function that is used for optimization can consume both of them.
|
|
Thus I could write two separate neural networks (such as for launch and partials),
|
|
and then write a third NN that binds the two together.
|