Skip to main content

VNorm

VNorm is a parametric activation intended to be used after BatchNorm:

Linear/Conv -> BatchNorm -> VNorm

This repository contains the public, minimal version of the method and the CIFAR-100 MLP benchmark used in the paper draft. Private ideas such as Prisma-Rombo and unpublished extensions are intentionally not included.

Install

pip install vnorm-torch

Minimal usage

VNorm is designed for the feature-last layout used by PyTorch MLPs. Its recommended configuration is BatchNorm followed by VNorm:

import torch
from torch import nn
from vnorm import VNorm

model = nn.Sequential(
    nn.Linear(32 * 32 * 3, 256),
    nn.BatchNorm1d(256),
    VNorm(256),
    nn.Linear(256, 100),
)

x = torch.randn(8, 32 * 32 * 3)
y = model(x)

The package requires PyTorch 2.0 or newer. CUDA support is inherited from the installed PyTorch build; a custom CUDA kernel is planned as a later optional optimization.

Run the benchmark

The default experiment runs CIFAR-100 with three seeds and 30 epochs:

python experiments/cifar100_mlp.py

For a quick smoke run:

EPOCHS=5 SEEDS=42 python experiments/cifar100_mlp.py

Results are written to results/cifar100_mlp_results.csv.

Current claim

The intended claim is narrow: VNorm is a BatchNorm-compatible activation and shows its strongest behavior in the BatchNorm -> VNorm regime. The benchmark does not claim universal superiority without BatchNorm.

Release files for vnorm-torch 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vnorm-torch 0.1.0
File Size Uploaded
vnorm_torch-0.1.0.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vnorm-torch 0.1.0
File Interpreter ABI Platform
vnorm_torch-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / vnorm_torch-0.1.0.tar.gz

Download URL vnorm_torch-0.1.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
316a81d7084582a7eca6c11c4ff51d1af3edbabad428c04200343f86ce776572
BLAKE2b-256 checksum
How to use checksums
f608929c33d254291166ba099f9d2a03dd37e4346268af59b6ae74f467cecc2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / vnorm_torch-0.1.0-py3-none-any.whl

Download URL vnorm_torch-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53886b17778de5609a8dd3d80021790994518b1dd41d241a297b7b5de6ca1371
BLAKE2b-256 checksum
How to use checksums
d5bd2f78dc525efa5f245087f6eb41f7f39142441dd820a9e773081fb52f4be9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page