def update_target(self): copy(np.frombuffer(self.target_vars.vars, ctypes.c_float), np.frombuffer(self.learning_vars.vars, ctypes.c_float)) # Set shared flags for i in xrange(len(self.target_update_flags.updated)): self.target_update_flags.updated[i] = 1
def update_target(self): if self.alg_type != "AE": copy(np.frombuffer(self.target_vars.vars, ctypes.c_float), np.frombuffer(self.learning_vars.vars, ctypes.c_float)) else: copy(np.frombuffer(self.target_vars_lower.vars, ctypes.c_float), np.frombuffer(self.learning_vars_lower.vars, ctypes.c_float)) copy(np.frombuffer(self.target_vars_upper.vars, ctypes.c_float), np.frombuffer(self.learning_vars_upper.vars, ctypes.c_float)) # Set shared flags for i in range(len(self.target_update_flags.updated)): self.target_update_flags.updated[i] = 1