wait for further opt
This commit is contained in:
@ -73,6 +73,9 @@ class PacmanDeepQAgent(PacmanQAgent):
|
||||
else:
|
||||
print("Initializing new model parameters")
|
||||
def save_model(self, filename="para.bin"):
|
||||
if model.kProductionMode:
|
||||
print("in production mode, not saving model")
|
||||
return
|
||||
print(f"Saving model parameters to {filename}")
|
||||
torch.save({
|
||||
'model_state_dict': self.model.state_dict(),
|
||||
|
@ -11,7 +11,7 @@ from torch import tensor, double, optim
|
||||
from torch.nn.functional import relu, mse_loss
|
||||
import torch
|
||||
|
||||
kProductionMode=True
|
||||
kProductionMode=False
|
||||
class DeepQNetwork(Module):
|
||||
"""
|
||||
A model that uses a Deep Q-value Network (DQN) to approximate Q(s,a) as part
|
||||
|
Reference in New Issue
Block a user