Skip to content
EthanTreg edited this page Jun 12, 2025 · 4 revisions

PyTorch Network Loader

Allows the easy creation and training of neural networks in PyTorch using .json files.
Network creation automatically tracks layer output shapes; therefore, knowledge of the input into each layer is not needed.
Networks are loaded from .json files, constructed, then a network object is returned that has all the training functionality built into it.

See the Jupyter Notebook for an example on how to use this package.
For an application of this package (v3.2.4), see Fast Spectra Predictor Network.

Requirements

Using Within Projects

  • Add netloader @ git+https://github.com/EthanTreg/PyTorch-Network-Loader@LATEST-VERSION1 to requirements.txt
  • Install using pip install -r requirements.txt
  • Example of InceptionV4 or ConvNeXt can be downloaded under ./network_configs/inceptionv4.json or ./network_configs/convnext.json along with the composite layers in ./network_configs/composite_layers/

1To use normalizing flows, netloader must be pip installed with the optional argument flows: pip install netloader[flows] @ git+https://github.com/EthanTreg/PyTorch-Network-Loader@LATEST-VERSION

Locally Running NetLoader

  • Clone or download the repository
  • Install dependencies: pip install -r requirements.txt
  • PyTorch's dependencies[^1]:
    NVIDIA GPU with CUDA Toolkit ~= v12.1 [^1]: Only required for use with NVIDIA GPU, v11.8 is also supported, but requirements.txt will try to install the v12.1 version

Documentation for netloader-v3.6.1

Clone this wiki locally