Updated grad clips
BIN
agents/.DS_Store
vendored
|
@ -104,14 +104,16 @@ class Agent:
|
|||
|
||||
T.nn.utils.clip_grad_norm_(
|
||||
self.actor.parameters(), max_norm=2)
|
||||
|
||||
T.nn.utils.clip_grad_norm_(
|
||||
self.critic.parameters(), max_norm=2)
|
||||
|
||||
# Calculate the gradient norms for both networks
|
||||
actor_grad_norm = T.nn.utils.clip_grad_norm_(
|
||||
self.actor.parameters(), max_norm=1)
|
||||
self.actor.parameters(), max_norm=2)
|
||||
|
||||
critic_grad_norm = T.nn.utils.clip_grad_norm_(
|
||||
self.critic.parameters(), max_norm=1)
|
||||
self.critic.parameters(), max_norm=2)
|
||||
|
||||
# Log or print the gradient norms
|
||||
print(f"Actor Gradient Norm: {actor_grad_norm}")
|
||||
|
|
BIN
agents/saved_models/A0
Normal file
BIN
agents/saved_models/C0
Normal file
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 13 KiB |