Commit 5d9ba4fa authored by Nicola Gatto's avatar Nicola Gatto
Browse files

Fix a bug which caused a crash after DQN evaluation

parent f8565806
Pipeline #149947 failed with stages
...@@ -906,4 +906,4 @@ class DqnAgent(Agent): ...@@ -906,4 +906,4 @@ class DqnAgent(Agent):
def _save_current_as_best_net(self): def _save_current_as_best_net(self):
self._best_net = copy_net( self._best_net = copy_net(
self._qnet, (1,) + self._state_dim, ctx=self._ctx) self._qnet, self._state_dim, ctx=self._ctx)
...@@ -906,4 +906,4 @@ class DqnAgent(Agent): ...@@ -906,4 +906,4 @@ class DqnAgent(Agent):
def _save_current_as_best_net(self): def _save_current_as_best_net(self):
self._best_net = copy_net( self._best_net = copy_net(
self._qnet, (1,) + self._state_dim, ctx=self._ctx) self._qnet, self._state_dim, ctx=self._ctx)
...@@ -906,4 +906,4 @@ class DqnAgent(Agent): ...@@ -906,4 +906,4 @@ class DqnAgent(Agent):
def _save_current_as_best_net(self): def _save_current_as_best_net(self):
self._best_net = copy_net( self._best_net = copy_net(
self._qnet, (1,) + self._state_dim, ctx=self._ctx) self._qnet, self._state_dim, ctx=self._ctx)
...@@ -906,4 +906,4 @@ class DqnAgent(Agent): ...@@ -906,4 +906,4 @@ class DqnAgent(Agent):
def _save_current_as_best_net(self): def _save_current_as_best_net(self):
self._best_net = copy_net( self._best_net = copy_net(
self._qnet, (1,) + self._state_dim, ctx=self._ctx) self._qnet, self._state_dim, ctx=self._ctx)
...@@ -906,4 +906,4 @@ class DqnAgent(Agent): ...@@ -906,4 +906,4 @@ class DqnAgent(Agent):
def _save_current_as_best_net(self): def _save_current_as_best_net(self):
self._best_net = copy_net( self._best_net = copy_net(
self._qnet, (1,) + self._state_dim, ctx=self._ctx) self._qnet, self._state_dim, ctx=self._ctx)
...@@ -906,4 +906,4 @@ class DqnAgent(Agent): ...@@ -906,4 +906,4 @@ class DqnAgent(Agent):
def _save_current_as_best_net(self): def _save_current_as_best_net(self):
self._best_net = copy_net( self._best_net = copy_net(
self._qnet, (1,) + self._state_dim, ctx=self._ctx) self._qnet, self._state_dim, ctx=self._ctx)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment