5,321
edits
(→Usage) |
|||
Line 44: | Line 44: | ||
This function allows you to perform interpolation on your input tensor.<br> | This function allows you to perform interpolation on your input tensor.<br> | ||
It is very useful for resizing images or warping images. | It is very useful for resizing images or warping images. | ||
==Building a Model== | |||
To build a model, do the following: | |||
* Create a class extending <code>nn.Module</code>. | |||
* In your class include all other modules you need during init. | |||
** If you have a list of modules, make sure to wrap them in <code>nn.ModuleList</code> or <code>nn.Sequential</code> so they are properly recognized. | |||
* Write a forward pass for your model. | |||
==Memory Usage== | ==Memory Usage== |