Skip to main content

PyCandle is a lightweight library for pytorch that makes running experiments easy, structured, repeatable and avoids boilerplate code.

Project description

# PyCandle

PyCandle is a lightweight library for pytorch that makes running experiments easy, structured, repeatable and avoids boilerplate code. It maintains flexibilty and allows to train also more complex models like recurrent or generative neural networks conveniently.

Usage

This code snippet creates a timestamped directory for the current experiment, runs the training of the model, creates a backup of all used code, logs current git hash and forks console output into a log file:

model = Net().cuda()
experiment = Experiment('mnist_example')
train_loader = load_dataset(batch_size_train=64)
optimizer = torch.optim.Adam(model.parameters(), lr=0.01)
model_trainer = ModelTrainer(model, optimizer, F.nll_loss, 20, train_loader, gpu=0)
model_trainer.start_training()

A complete example for training a model to classify hand-written MNIST digits can be found in minimal_example/mnist.py.

Installation

Via PIP

The easiest way to install pycandle is through pip:

pip install pycandle

Requirements

We tested PyCandle with the dependency versions listed here. However, PyCandle can also work with newer versions if they are downward compatible.

  • Python 3.5.4
  • PyTorch 0.4.1
  • cudnn 7.0.5
  • torchvision 0.2.1 (for examples)
  • matplotlib 2.1.1 (for examples)

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

pycandle-1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

pycandle-1.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file pycandle-1.0.tar.gz.

File metadata

  • Download URL: pycandle-1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for pycandle-1.0.tar.gz
Algorithm Hash digest
SHA256 a7bf58f6671817a0d8308c4d043a84d2cbf7d1db958a79c81abb4511d52a8257
MD5 86c784cbf8ad34712fb19b64aa8768e9
BLAKE2b-256 d6ed62ec86d2c18079d557310968e9fb74a08a0b91b16a8300752fdf9db17272

See more details on using hashes here.

File details

Details for the file pycandle-1.0-py3-none-any.whl.

File metadata

  • Download URL: pycandle-1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for pycandle-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 861bcde07b4e27920f28fb723c18fbc5bef1089bdf739e9f81f43f3b7c9dfdf1
MD5 f976efdde8aad40bd6710421bcb347f2
BLAKE2b-256 4307970d2ceee68cde276e09442e2bfc09d687f5fc545fbc80f0a28b3fd121b0

See more details on using hashes here.

Supported by

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