Spaces:
Sleeping
Sleeping
minor fix
Browse files- MyMarioAI.py +1 -1
MyMarioAI.py
CHANGED
|
@@ -34,7 +34,7 @@ def load_mario(env, save_dir):
|
|
| 34 |
|
| 35 |
# Load from default chkpt.
|
| 36 |
if Path(mario.default_chkpoint).is_file():
|
| 37 |
-
dic = torch.load(mario.default_chkpoint)
|
| 38 |
mario.net.load_state_dict(dic["model"])
|
| 39 |
mario.exploration_rate = dic["exploration_rate"]
|
| 40 |
|
|
|
|
| 34 |
|
| 35 |
# Load from default chkpt.
|
| 36 |
if Path(mario.default_chkpoint).is_file():
|
| 37 |
+
dic = torch.load(mario.default_chkpoint, map_location=torch.device('cpu'))
|
| 38 |
mario.net.load_state_dict(dic["model"])
|
| 39 |
mario.exploration_rate = dic["exploration_rate"]
|
| 40 |
|