Skip to content
Snippets Groups Projects
Commit 25878c72 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

load message fix

parent cc46818b
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,7 @@ class ActorCriticModel(nn.Module): ...@@ -85,7 +85,7 @@ class ActorCriticModel(nn.Module):
return obj return obj
def load(self, filename): def load(self, filename):
print("load policy from file", filename) print("load model from file", filename)
self.actor = self._load(self.actor, filename + ".actor") self.actor = self._load(self.actor, filename + ".actor")
self.critic = self._load(self.critic, filename + ".value") self.critic = self._load(self.critic, filename + ".value")
...@@ -284,6 +284,8 @@ class PPOPolicy(LearningPolicy): ...@@ -284,6 +284,8 @@ class PPOPolicy(LearningPolicy):
obj.load_state_dict(torch.load(filename, map_location=self.device)) obj.load_state_dict(torch.load(filename, map_location=self.device))
except: except:
print(" >> failed!") print(" >> failed!")
else:
print(" >> file not found!")
return obj return obj
def load(self, filename): def load(self, filename):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment