Skip to main content

Useful PyTorch Layers

Project description


A library with customized PyTorch layers and model components.


To install the latest stable version:

pip install deepblocks

For a specific version:

pip install deepblocks==0.1.9

To install the latest, but unstable version:

pip install git+

What's available:


  • ConvMixer
  • U-Net
  • ICT-Net


  • ConvMixer Layer
  • Flip-Invariant Conv2d
  • Squeeze-Excitation Block
  • Dense Block
  • Multi-Head Self-Attention
  • Multi-Head Self-Attention V2


  • Funnel ReLU

Loss Functions

  • Focal Loss
  • AUC Loss
  • AUC Margin Loss
  • KL Divergence Loss

Regularization functions

  • Anti-Correlation

Self-supervised Learning

  • Barlow Twin
  • DINO


  • SAM


The current documention is hosted here

Bug or Feature:

Deepblocks is a growing package. If you encounter a bug or would like to request a feature, please feel free to open an issue here.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepblocks-0.1.13.tar.gz (21.9 kB view hashes)

Uploaded Source

Built Distribution

deepblocks-0.1.13-py3-none-any.whl (31.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page