Skip to main content
https://img.shields.io/pypi/v/pytorch-nn-tools.svg https://travis-ci.com/serge-m/pytorch-nn-tools.svg?branch=master Documentation Status

Tools for NN creation with Pytorch. The project is greatly inspired by fast.ai library. The project brings the convenience functions from fast.ai to a usual pytorch user.

Usage examples

CheckpointSaver

from pytorch_nn_tools.devices import to_device
from pytorch_nn_tools.train.checkpoint import CheckpointSaver

checkpoint_saver = CheckpointSaver(path_checkpoints, logger=DummyLogger())

# create your model, optimizer, scheduler
# train for several epochs
for epoch in range(100):
    .....
    # at the end of each epoch we save the results
    checkpoint_saver.save(model, optimizer, scheduler, epoch)



# later you can load the latest checkpoint and continue training
last = checkpoint_saver.find_last(start_epoch, end_epoch)
if last is not None:
    print(f"found pretrained results for epoch {last}. Loading...")
    self.checkpoint_saver.load(model, optimizer, scheduler, last)
else:
    print(f"pretrained weights are not found")

Misc

Release files for pytorch-nn-tools 0.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytorch-nn-tools 0.3.7
File Size Uploaded
pytorch_nn_tools-0.3.7.tar.gz 18.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytorch-nn-tools 0.3.7
File Interpreter ABI Platform
pytorch_nn_tools-0.3.7-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 32.9 kB

Release files / pytorch_nn_tools-0.3.7.tar.gz

Download URL pytorch_nn_tools-0.3.7.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e5c5f57c5844de1e416a5db41da3ee20791242e2102c5225537bde96db041b19
BLAKE2b-256 checksum
How to use checksums
bda8cff6ba91ebcc953bb0f89f91f77c93c4d38e09d8e12ef9dfc2cbb8aba5ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.6

Release files / pytorch_nn_tools-0.3.7-py2.py3-none-any.whl

Download URL pytorch_nn_tools-0.3.7-py2.py3-none-any.whl
Size 14.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
46c6e1222dabe0594b287dd3d2531757d996a6a3c111da3c6888e46a8b867eb7
BLAKE2b-256 checksum
How to use checksums
f1ea9a99e42016d4cdc2d72a47e6336580fb79922860c8ad438c49826bb3d528
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.3.7 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page