Some functionalities:

  • Shape inference for most of torch.nn module (convolutional, recurrent, transformer, attention and linear layers)
  • Dimensionality inference (e.g. torchlayers.Conv working as torch.nn.Conv1d/2d/3d based on input shape)
  • Shape inference of custom modules (see examples section)
  • Additional Keras-like layers (e.g. torchlayers.Reshape or torchlayers.StandardNormalNoise)
  • Additional SOTA layers mostly from ImageNet competitions (e.g. PolyNet, Squeeze-And-Excitation, StochasticDepth)
  • Useful defaults ("same" padding and default kernel_size=3 for Conv, dropout rates etc.)
  • Zero overhead and torchscript support

See project's full description, examples etc. under this link: https://github.com/szymonmaszke/torchlayers

Don't forget to tag @szymonmaszke in your comment, otherwise they may not be notified.

Authors
Share this project
Similar projects
Medical Zoo - 3D Multi-modal Medical Image Segmentation
My articles on deep learning in medical imaging
Torchdata
Equip PyTorch's Dataset with map, cache etc. (like tf.data)
PyTorch CNN Trainer
A simple package to fine-tune CNNs from torchvision and Pytorch Image models by Ross Wightman.
MedicalZoo PyTorch
A pytorch-based deep learning framework for multi-modal 2D/3D medical image segmentation
Top collections