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

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.

Files for pycandle, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size pycandle-1.0-py3-none-any.whl (15.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pycandle-1.0.tar.gz (12.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page