Skip to content

Commit

Permalink
Update predict.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AsCome11 authored Dec 21, 2023
1 parent 1e1d956 commit 1bf5e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

net = SegmentModel(output_size=output_size, out_cls=21, node=BiasLIFNode, step=step)
# load model
torch.load(net, device, './checkpoints/Segment_SNN.pth')
net.load_state_dict(torch.load('./checkpoints/Segment_SNN.pth'))
net = net.to(device)
with torch.no_grad():
for (idx, img) in enumerate(test_iter):
Expand Down

0 comments on commit 1bf5e20

Please sign in to comment.