Spaces:
Build error
Build error
edits
Browse files
app.py
CHANGED
@@ -37,9 +37,9 @@ for name, param in net_sfm.named_parameters():
|
|
37 |
|
38 |
state2 = torch.load('fire_imagenet.pth', map_location='cpu')
|
39 |
state2['net_params'] = state['net_params']
|
40 |
-
|
41 |
net_imagenet = fire_network.init_network(**state['net_params']).to(device)
|
42 |
-
net_imagenet.load_state_dict(state2['state_dict']
|
43 |
|
44 |
# ---------------------------------------
|
45 |
transform = transforms.Compose([
|
|
|
37 |
|
38 |
state2 = torch.load('fire_imagenet.pth', map_location='cpu')
|
39 |
state2['net_params'] = state['net_params']
|
40 |
+
state2['state_dict'] = dict(state2['state_dict'], **dim_red_params_dict);
|
41 |
net_imagenet = fire_network.init_network(**state['net_params']).to(device)
|
42 |
+
net_imagenet.load_state_dict(state2['state_dict'], strict=False)
|
43 |
|
44 |
# ---------------------------------------
|
45 |
transform = transforms.Compose([
|