Views
No views yet
[batch, frames, 80] (80 mel bins, 25 ms frame length, 10 ms frame shift, 16 kHz)[batch, 256]model.safetensors with PyTorch-native key naming:| Prefix | Description |
|---|---|
front.conv1.*, front.bn1.* | Stem (3×3 conv, no maxpool) |
front.layer{1-4}.{n}.conv{1,2}.* | ResNet basic blocks (49 total) |
front.layer{2-4}.0.downsample.* | 1×1 channel/stride projection |
pooling.attention.* | ASP attention (Conv1d 5120→128→5120) |
bottleneck.* | Linear 10240→256 |
weight, bias, running_mean, running_var (folded format). The num_batches_tracked bookkeeping tensor is omitted.1import torch
2from safetensors.torch import load_file
3
4state_dict = load_file("model.safetensors")
5# Load into SimAM_ResNet100_ASP(in_planes=64, embed_dim=256, acoustic_dim=80)
6# model.load_state_dict(state_dict, strict=True)
7
8# Input: [B, T, 80] log-mel fbank
9# Output: [B, 256] speaker embeddingavg_model.pt from the lengyue233/wespeaker-voxblink2-samresnet100 mirrorwespeaker/models/samresnet.py