|
- Make Ecoset TEST DataLoader finished! Time: 2022-11-17 15:13:56.966879
-
- Load model '/code/pretrained_model/sew_resnet18.pth' successfully!
-
- SEWResNet(
- (conv1): Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False, step_mode=m)
- (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn1): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (maxpool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False, step_mode=m)
- (layer1): Sequential(
- (0): BasicBlock(
- cnf=ADD
- (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn1): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn2): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- )
- (1): BasicBlock(
- cnf=ADD
- (conv1): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn1): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn1): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn2): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- )
- )
- (layer2): Sequential(
- (0): BasicBlock(
- cnf=ADD
- (conv1): Conv2d(64, 128, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False, step_mode=m)
- (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn1): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn2): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (downsample): Sequential(
- (0): Conv2d(64, 128, kernel_size=(1, 1), stride=(2, 2), bias=False, step_mode=m)
- (1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- )
- (downsample_sn): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- )
- (1): BasicBlock(
- cnf=ADD
- (conv1): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn1): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn1): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (conv2): Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn2): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- )
- )
- (layer3): Sequential(
- (0): BasicBlock(
- cnf=ADD
- (conv1): Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False, step_mode=m)
- (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn1): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn2): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (downsample): Sequential(
- (0): Conv2d(128, 256, kernel_size=(1, 1), stride=(2, 2), bias=False, step_mode=m)
- (1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- )
- (downsample_sn): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- )
- (1): BasicBlock(
- cnf=ADD
- (conv1): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn1): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn1): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (conv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn2): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- )
- )
- (layer4): Sequential(
- (0): BasicBlock(
- cnf=ADD
- (conv1): Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False, step_mode=m)
- (bn1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn1): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn2): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn2): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (downsample): Sequential(
- (0): Conv2d(256, 512, kernel_size=(1, 1), stride=(2, 2), bias=False, step_mode=m)
- (1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- )
- (downsample_sn): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- )
- (1): BasicBlock(
- cnf=ADD
- (conv1): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn1): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- (conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False, step_mode=m)
- (bn2): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, step_mode=m)
- (sn2): LIFNode(
- v_threshold=1.0, v_reset=0.0, detach_reset=True, step_mode=m, backend=cupy, tau=2.0
- (surrogate_function): ATan(alpha=2.0, spiking=True)
- )
- )
- )
- (avgpool): AdaptiveAvgPool2d(output_size=(1, 1), step_mode=m)
- (fc): Linear(in_features=512, out_features=565, bias=True)
- )
-
- Run on time: 2022-11-17 15:13:59.460089
-
- Model name: sew_resnet18
- Model size: 87.6 MB
- Model description: A directedly trained snn model proposed in Fang et al. NeurIPS 2021 (Deep residual learning in spiking neural networks)
- Batch 1, Batch acc@1: 31.2500, Avg acc@1: 31.2500, Batch acc@5: 68.7500, Avg acc@5: 68.7500,Time: 0:00:08
- Batch 101, Batch acc@1: 40.6250, Avg acc@1: 43.0074, Batch acc@5: 71.8750, Avg acc@5: 66.5223,Time: 0:08:05
- Batch 201, Batch acc@1: 37.5000, Avg acc@1: 43.3769, Batch acc@5: 65.6250, Avg acc@5: 67.5995,Time: 0:16:06
- Batch 301, Batch acc@1: 46.8750, Avg acc@1: 43.5527, Batch acc@5: 71.8750, Avg acc@5: 67.9194,Time: 0:24:41
- Batch 401, Batch acc@1: 46.8750, Avg acc@1: 43.2357, Batch acc@5: 65.6250, Avg acc@5: 67.8304,Time: 0:33:19
- Batch 501, Batch acc@1: 34.3750, Avg acc@1: 43.2635, Batch acc@5: 59.3750, Avg acc@5: 67.6148,Time: 0:42:28
- Batch 601, Batch acc@1: 34.3750, Avg acc@1: 43.4224, Batch acc@5: 50.0000, Avg acc@5: 67.7517,Time: 0:50:26
- Batch 701, Batch acc@1: 40.6250, Avg acc@1: 43.4870, Batch acc@5: 56.2500, Avg acc@5: 67.7470,Time: 0:58:32
- Batch 801, Batch acc@1: 40.6250, Avg acc@1: 43.5978, Batch acc@5: 53.1250, Avg acc@5: 67.7864,Time: 1:06:27
-
- Testing average acc@1: 43.5363, time cost: 1:13:55
- Testing average acc@5: 67.6637, time cost: 1:13:55
|