feat: Add the second exercise (first throw)
All checks were successful
SonarQube Scan / SonarQube Trigger (push) Successful in 24s
All checks were successful
SonarQube Scan / SonarQube Trigger (push) Successful in 24s
This commit is contained in:
4
tp2.py
4
tp2.py
@@ -38,8 +38,8 @@ def train_and_save(weights_path="acrobot_dqn.pth", episodes=2000, update_target_
|
||||
n_states, n_actions = env.observation_space.shape[0], env.action_space.n
|
||||
|
||||
# les DQN
|
||||
policy_net = DQN(n_states, n_actions) #
|
||||
target_net = DQN(n_states, n_actions)
|
||||
policy_net = DQN(n_states, n_actions) # Q Network
|
||||
target_net = DQN(n_states, n_actions) # Target network
|
||||
target_net.load_state_dict(policy_net.state_dict()) # same weights at start
|
||||
target_net.eval()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user