Made changes to the load_state_dict to only load the model_state_dict
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ print('Loading Model State Dictionary')
|
|
| 30 |
flower_model.load_state_dict(
|
| 31 |
torch.load(f=saved_path,
|
| 32 |
map_location=torch.device('cpu'), # load to CPU
|
| 33 |
-
)
|
| 34 |
)
|
| 35 |
|
| 36 |
print('Model Loaded ...')
|
|
|
|
| 30 |
flower_model.load_state_dict(
|
| 31 |
torch.load(f=saved_path,
|
| 32 |
map_location=torch.device('cpu'), # load to CPU
|
| 33 |
+
)['model_state_dict']
|
| 34 |
)
|
| 35 |
|
| 36 |
print('Model Loaded ...')
|