examples.pytorch_cifar10 module

Example usage of crumpets to train a custom model on Cifar10. Less complex compared to resnet example, since less parameters are considered (some are just set to their default value to make the example more intuitive). Cifar10 can either be processed to be in msgpack format or directly downloaded, using Datadings. This example is capable of using multiple gpus. If no datadir is given a default sample of 10 images is used while the loader is told that there are 2000 images to mimic a real dataset.

class examples.pytorch_cifar10.Net(*args: Any, **kwargs: Any)[source]

Bases: torch.nn.

forward(sample)[source]
examples.pytorch_cifar10.main(datadir, outdir, batch_size, epochs, lr, cuda=True)[source]
examples.pytorch_cifar10.make_loader(file, batch_size, num_mini_batches, nworkers, image_rng=None, image_params=None, use_cuda=True, gpu_augmentation=True)[source]
examples.pytorch_cifar10.make_policy(epochs, network, lr, momentum)[source]