print(model.features.module[4].conv.weight.size())
(256, 96, 5, 5)
print(type(model.features.module[4]))
<class ‘model_list.alexnet.BinConv2d’>
print(state_dict[‘features.module.4.conv.weight’].size())
(256,96,5,5)
print(type(state_dict[‘features.module.4.conv.weight’]))
<class ‘torch.Tensor’>
print((model.features.module[4].conv.weight == state_dict[‘features.module.4.conv.weight’]).all())
tensor(True, device=‘cuda:0’)