diff --git a/Aimbot-PPO-Python/PPO.py b/Aimbot-PPO-Python/PPO.py index 9dfbaf4..e0d19d6 100644 --- a/Aimbot-PPO-Python/PPO.py +++ b/Aimbot-PPO-Python/PPO.py @@ -399,15 +399,15 @@ class PPO(object): Args: score (int): now score """ + actor_save_dir = self.saveDir+datetime.datetime.now().strftime("%H%M%S") + "/actor/" + "actor.ckpt" + critic_save_dir = self.saveDir+datetime.datetime.now().strftime("%H%M%S") + "/critic/" + "critic.ckpt" + self.actor.save_weights(actor_save_dir, save_format="tf") + self.critic.save_weights(critic_save_dir, save_format="tf") if score != None: # create an empty file named as score to recored score score_dir = self.saveDir+datetime.datetime.now().strftime("%H%M%S") + "/" + str(round(score)) scorefile = open(score_dir,'w') scorefile.close() - actor_save_dir = self.saveDir+datetime.datetime.now().strftime("%H%M%S") + "/actor/" + "actor.ckpt" - critic_save_dir = self.saveDir+datetime.datetime.now().strftime("%H%M%S") + "/critic/" + "critic.ckpt" - self.actor.save_weights(actor_save_dir, save_format="tf") - self.critic.save_weights(critic_save_dir, save_format="tf") print("Model's Weights Saved") def loadWeightToModels(self,loadDir):