A Python library for novel and experimental deep learning layers.
Project description
DeepResearchLayers
A Python library for novel and experimental deep learning layers.
deep_layers bridges the gap between mathematical theory and usable code, providing "plug-and-play" implementations for PyTorch (and TensorFlow/Keras) of complex layers from research papers.
Features
Dual-Backend Compatibility
Supports both PyTorch and TensorFlow (via deep_layers/torch and deep_layers/tf).
Implemented Layers
All layers are available for both PyTorch and TensorFlow.
deep_layers.vision
- CoordConv (
coord_conv): Coordinate Convolution. - DropBlock (
dropblock): Structured dropout regularization. - GLU (
glu): Gated Linear Unit. - Involution (
involution): Inverted convolution.
deep_layers.sequence
- Hyena (
hyena): Hyena Hierarchy operator. - Linear Attention (
linear_attention): Transformers are RNNs. - Mamba (
mamba): Selective State Space Model. - Retention (
retention): RetNet layer.
deep_layers.graph
- GCN (
gcn): Graph Convolutional Network. - NTN (
ntn): Neural Tensor Network. - PointNet (
pointnet): PointNet Set Abstraction. - Set Transformer (
set_transformer): Permutation-invariant attention. - SGR (
sgr): Symbolic Graph Reasoning.
deep_layers.scientific
- CORAL (
coral): Coordinate-based Neural Field Operator. - DeepONet (
deeponet): Deep Operator Network. - DEQ (
deq): Deep Equilibrium Models. - HyperLayer (
hyperlayer): HyperNetwork-based dynamic layer. - KAN (
kan): Kolmogorov-Arnold Network. - Neural ODE (
neural_ode): Ordinary Differential Equation solver layer. - PhyCRNet (
phycrnet): Physics-Informed Convolutional-Recurrent. - PirateNet (
piratenet): Physics-Informed Residual Adaptive Network. - Sparse Memory (
sparse_memory): Differentiable memory with sparse reads/writes. - Steerable Conv (
steerable_conv): E(2)-Equivariant Steerable CNN. - VQ (
vq): Vector Quantization layer.
Installation
Install with PyTorch support:
pip install "deep_layers[torch]"
Install with TensorFlow support:
pip install "deep_layers[tf]"
Install with both:
pip install "deep_layers[all]"
For development/editable install:
git clone https://github.com/yourusername/deep_layers.git
cd deep_layers
pip install -e .
Usage
PyTorch Example
import torch
from deep_layers.torch.vision import CoordConv
# Initialize layer
layer = CoordConv(in_channels=3, out_channels=64, kernel_size=3)
# Forward pass
x = torch.randn(1, 3, 224, 224)
output = layer(x)
print(output.shape)
TensorFlow Example
import tensorflow as tf
from deep_layers.tf.vision import CoordConv
# Initialize layer
layer = CoordConv(filters=64, kernel_size=3)
# Forward pass
x = tf.random.normal((1, 224, 224, 3))
output = layer(x)
print(output.shape)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deep_layers-0.1.0.tar.gz.
File metadata
- Download URL: deep_layers-0.1.0.tar.gz
- Upload date:
- Size: 95.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c575080b4b430fb85df7a78c1718e84dd4f1f541e35f4e0a1360df09dc506a3f
|
|
| MD5 |
58d85a8f7a394935f8c116586c9fe321
|
|
| BLAKE2b-256 |
712ddf1383244590b4146b4409fa80ee7adf2dcee5b67d34af3dfe84259fc617
|
Provenance
The following attestation bundles were made for deep_layers-0.1.0.tar.gz:
Publisher:
publish.yml on kuslavicek/deep_layers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deep_layers-0.1.0.tar.gz -
Subject digest:
c575080b4b430fb85df7a78c1718e84dd4f1f541e35f4e0a1360df09dc506a3f - Sigstore transparency entry: 883761027
- Sigstore integration time:
-
Permalink:
kuslavicek/deep_layers@937d0f072036bf2189c98a1be413c7382165b1b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kuslavicek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@937d0f072036bf2189c98a1be413c7382165b1b4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file deep_layers-0.1.0-py3-none-any.whl.
File metadata
- Download URL: deep_layers-0.1.0-py3-none-any.whl
- Upload date:
- Size: 77.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f06c48f28e735508fb375f1c8461684e3b7216a10b9c212aa1e5ea50a341ec09
|
|
| MD5 |
ece87e5f30231f787df572f06b2ada82
|
|
| BLAKE2b-256 |
638aaa63dbfbdf03d501828e5f74978a614dfcb4a81eb0b40b59285cac00d5b2
|
Provenance
The following attestation bundles were made for deep_layers-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on kuslavicek/deep_layers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deep_layers-0.1.0-py3-none-any.whl -
Subject digest:
f06c48f28e735508fb375f1c8461684e3b7216a10b9c212aa1e5ea50a341ec09 - Sigstore transparency entry: 883761070
- Sigstore integration time:
-
Permalink:
kuslavicek/deep_layers@937d0f072036bf2189c98a1be413c7382165b1b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kuslavicek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@937d0f072036bf2189c98a1be413c7382165b1b4 -
Trigger Event:
release
-
Statement type: