Large-Scale Machine and Deep Learning in PyTorch.
Project description
PyBlaze
PyBlaze is an unobtrusive, high-level library for large-scale machine and deep learning in PyTorch. It is engineered to cut obsolete boilerplate code while preserving the flexibility of PyTorch to create just about any deep learning model.
Quickstart
Plenty of tutorials are available in the official documentation. The most basic tutorial builds a classifier for CIFAR10.
Installation
PyBlaze is available on PyPi and can simply be installed as follows:
pip install pyblaze
Library Design
PyBlaze revolves around the concept of an engine. An engine is a powerful abstraction for combining a model's definition with the algorithm required to optimize its parameters according to some data. Engines provided by PyBlaze are focused on generalization: while the engine encapsulates the optimization algorithm, the user must explicitly define the optimization objective (usually the loss function).
However, engines go far beyond implementing the optimization algorithm. Specifically, they further provide the following features:
-
Evaluation: During training, validation data can be used to evaluate the generalization performance of the trained model every so often. Also, arbitrary metrics may be computed.
-
Callbacks: During training and model evaluation, callbacks serve as hooks called at specific events in the process. This makes it possible to easily use some tracking framework, perform early stopping, or dynamically adjust parameters over the course of the training. Custom callbacks can easily be created.
-
GPU Support: Training and model evaluation is automatically performed on all available GPUs. The same code that works for the CPU works for the GPU ... and also for multiple GPUs.
Available Engines
Engines are currently implemented for the following training procedures:
-
pyblaze.nn.MLEEngine
: This is the most central engine as it enables supervised as well as unsupervised learning. It can therefore adapt to multiple different problems: classification, regression, (variational) autoencoders, ..., depending on the loss only. In order to simplify initialization (as configuration requires toggling some settings), there exist some specialized MLE engines. Currently, the only one ispyblaze.nn.AutoencoderEngine
. -
pyblaze.nn.WGANEngine
: This engine is specifically designed for training Wasserstein GANs. This class is required due to the independent training of generator and critic.
Implementing your custom engine is rarely necessary for most common problems. However, when working
on highly customized machine learning models, it might be a good idea. Usually, it is sufficient to
implement the train_batch
and eval_batch
methods to specify how to perform training and
evaluation, respectively, for a single batch of data. Consult the documentation of
pyblaze.nn.Engine
to read about all methods available for override.
License
PyBlaze is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyblaze-2.3.2.tar.gz
.
File metadata
- Download URL: pyblaze-2.3.2.tar.gz
- Upload date:
- Size: 47.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 245e286718870c39b1b4065af4e26970c281fc5436d0ed2c177b24a2d589ef5f |
|
MD5 | 8e8319cec809006b73e9a821bf80c247 |
|
BLAKE2b-256 | 5ad2c5258dac70a0ce678473f1a3c78c366c631b089d98a396c059c3842dfe09 |
File details
Details for the file pyblaze-2.3.2-py3-none-any.whl
.
File metadata
- Download URL: pyblaze-2.3.2-py3-none-any.whl
- Upload date:
- Size: 66.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a10c02c343e45784347b8c0eb88b414529f105fe0de7b70c2ccde4b9753d0e7e |
|
MD5 | 673c2cfef6b627e6071296bb855385f8 |
|
BLAKE2b-256 | 7c996106b06fd16725af78476a83015976e117ec6274a9cbd2824974185719fe |