Interfaces: Python ⭐⭐⭐ (primary) · CLI — · MCP — · Skills ⭐⭐ · Hook — · HTTP —
scitex-nn
PyTorch building blocks specialized for neuroscience / signal-processing models — differentiable filters, Hilbert, B-shaped backbones, and spectral augmentation.
Differentiable filters
from scitex_nn import BandPassFilter, BandStopFilter, GaussianFilter
bp = BandPassFilter(low=4.0, high=8.0, fs=1000.0, order=4)
y = bp(x) # x: (batch, channels, samples)
DifferentiableBandPassFilter learns low/high end-to-end (use when
the band of interest is itself a hyperparameter).
Hilbert transform
from scitex_nn import Hilbert
analytic = Hilbert()(x) # x: (..., samples) → complex tensor
Backbones
from scitex_nn import BNet, BNet_Res, BNet_config_v1
cfg = BNet_config_v1(in_chans=64, out_chans=2, ...)
model = BNet(cfg)
BNet_Res adds residual connections; the same config dataclass works.
Augmentation
AxiswiseDropout(p, axis)— drops along a chosen axis (channel, time, frequency)DropoutChannels(p)— convenience wrapperChannelGainChanger(min_gain, max_gain)— random per-channel gainFreqGainChanger(...)— same in frequency domain via FFT
These compose as plain nn.Modules — drop into a nn.Sequential.
When to use
- ✅ Trainable / differentiable signal processing inside a model
- ✅ SSL-style time / frequency augmentation pipelines
- ✅ Replacing tens of lines of hand-rolled FIR/Butterworth init
- ❌ Classical (non-trainable) filtering — use
scipy.signalorscitex-dsp
See also
scitex-dsp— non-trainable counterparts (numpy/scipy-backed)- General skill
01_arch_06_local-state-directories.mdif model checkpoints / cache directories need a canonical location