def q_variables(self):
Return the list of variables for Q / twin Q nets.
return list(self.q_net.parameters()) + \
(list(self.twin_q_net.parameters()) if self.twin_q_net else [])
After Change
def q_variables(self):
Return the list of variables for Q / twin Q nets.
return self.q_net.variables() + (self.twin_q_net.variables()
if self.twin_q_net else [])