Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dian xt ms #29

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update ppo
  • Loading branch information
AmiyaSX committed Sep 12, 2023
commit c7fba1b0c8c91fa3d1751b948bf1e6094c262b09
1 change: 0 additions & 1 deletion xt/model/ppo/ppo_ms.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def __init__(self, net, loss_fn, dist):
def construct(self, state_ph, adv_ph, old_logp_ph, behavior_action, target_v, old_v_ph):
pi_latent, v_out = self.net(state_ph)
ent = self.dist.entropy(pi_latent)
pi_latent = pi_latent.astype(ms.float16)
action_log_prob = self.dist.log_prob(behavior_action, pi_latent)
loss = self._loss_fn(action_log_prob, ent, adv_ph, old_logp_ph, target_v, v_out, old_v_ph)
return loss
Expand Down