Skip to content

Files

Latest commit

 

History

History

going_modular

05. PyTorch Going Modular

The main goal of section 05. PyTorch Going Modular is to: turn useful notebook code cells into reusable Python scripts (.py files).

This directory contains all the necessary materials for doing so.

They breakdown as follows:

  • going_modular/ - directory of Python helper scripts for running PyTorch code (generated by 05_pytorch_going_modular_script_mode.ipynb).
  • models/ - trained PyTorch models that come as a result of running notebook 05. Going Modular Part 1 and Part 2.
  • 05_pytorch_going_modular_cell_mode.ipynb - Part 1/2 notebooks for teaching the materials for section 05. This notebook takes the most useful code from notebook 04 and streamlines it.
  • 05_pytorch_going_modular_script_mode.ipynb - Part 2/2 notebooks for teaching the materials for section 05. This notebooks turns the most useful code cells from Part 1 into the Python scripts contained in going_modular/.

For this section, we're going to see how the Part 1 notebook (cell mode) turns into the Part 2 notebook (script mode).

Doing this will result in us having a directory with the same structure as the going_modular/ directory above.