Skip to main content

Tools for NN creation with Pytorch

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytorch_nn_tools-0.3.7.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

pytorch_nn_tools-0.3.7-py2.py3-none-any.whl (14.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pytorch_nn_tools-0.3.7.tar.gz.

File metadata

  • Download URL: pytorch_nn_tools-0.3.7.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pytorch_nn_tools-0.3.7.tar.gz
Algorithm Hash digest
SHA256 e5c5f57c5844de1e416a5db41da3ee20791242e2102c5225537bde96db041b19
MD5 d0cbc61b071d7a5aec37aee5c79b42ca
BLAKE2b-256 bda8cff6ba91ebcc953bb0f89f91f77c93c4d38e09d8e12ef9dfc2cbb8aba5ea

See more details on using hashes here.

File details

Details for the file pytorch_nn_tools-0.3.7-py2.py3-none-any.whl.

File metadata

  • Download URL: pytorch_nn_tools-0.3.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for pytorch_nn_tools-0.3.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 46c6e1222dabe0594b287dd3d2531757d996a6a3c111da3c6888e46a8b867eb7
MD5 77d317bb60a9966376bd264b5f1b9b80
BLAKE2b-256 f1ea9a99e42016d4cdc2d72a47e6336580fb79922860c8ad438c49826bb3d528

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page