torchlayers is a PyTorch based library providing automatic shape and dimensionality inference of `torch.nn` layers and additional building blocks featured in current SOTA architectures (e.g. Efficient-Net).
Shape inference for most of
torch.nnmodule (convolutional, recurrent, transformer, attention and linear layers)
Dimensionality inference (e.g.
Shape inference of custom modules (see GitHub README)
Useful defaults (
"same"padding and default
Conv, dropout rates etc.)
Zero overhead and torchscript support
If you wish to use those without shape inferrence capabilities use fully qualified module name,
Following installation methods are available:
To install latest release:
pip install --user torchlayers
pip install --user torchlayers-nightly
torchlayers images are available both CPU and GPU-enabled.
You can find them at Docker Cloud at
CPU image is based on ubuntu:18.04 and official release can be pulled with:
docker pull szymonmaszke/torchlayers:18.04
docker pull szymonmaszke/torchlayers:nightly_18.04
This image is significantly lighter due to lack of GPU support.
Following images are available:
docker pull szymonmaszke/torchlayers:10.1-cudnn7-runtime-ubuntu18.04
You can use
nightly builds as well, just prefix the tag with
nightly_, for example
docker pull szymonmaszke/torchlayers:nightly_10.1-cudnn7-runtime-ubuntu18.04