# Scitex Nn

> > **Interfaces:** Python ⭐⭐⭐ (primary) · CLI — · MCP — · Skills ⭐⭐ · Hook — · HTTP —

- Skill: `aibot88/scitex-nn` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add aibot88/scitex-nn`
- Raw SKILL.md: https://api.skillmd.com/api/skills/aibot88/scitex-nn/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: aibot88 (https://skillmd.com/u/aibot88)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/aibot88/scitex-nn

---


> **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

```python
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

```python
from scitex_nn import Hilbert
analytic = Hilbert()(x)          # x: (..., samples) → complex tensor
```

## Backbones

```python
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 wrapper
- `ChannelGainChanger(min_gain, max_gain)` — random per-channel gain
- `FreqGainChanger(...)` — same in frequency domain via FFT

These compose as plain `nn.Module`s — 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.signal` or
  `scitex-dsp`

## See also

- `scitex-dsp` — non-trainable counterparts (numpy/scipy-backed)
- General skill `01_arch_06_local-state-directories.md` if model
  checkpoints / cache directories need a canonical location

<!-- EOF -->

