浏览代码

small fix

/develop/transfer-bisim
yanchaosun 4 年前
当前提交
7508a130
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 8
      ml-agents/mlagents/trainers/policy/transfer_policy.py

8
ml-agents/mlagents/trainers/policy/transfer_policy.py


return kl
def w_distance(self, another):
return tf.reduce_mean(tf.squared_difference(self.mu, another.mu))\
+ tf.reduce_mean(tf.squared_difference(self.sigma, another.sigma))
return tf.reduce_sum(tf.squared_difference(self.mu, another.mu))\
+ tf.reduce_sum(tf.squared_difference(self.sigma, another.sigma))
class TransferPolicy(TFPolicy):

if predict_return:
with tf.variable_scope("reward"):
self.create_reward_model(self.encoder, self.next_encoder, forward_layers-1)
self.create_reward_model(self.encoder, self.next_encoder, forward_layers)
self.vis_encode_type, forward_layers, forward_layers-1, var_predict, predict_return)
self.vis_encode_type, forward_layers, forward_layers, var_predict, predict_return)
if self.use_continuous_act:
self._create_cc_actor(

正在加载...
取消
保存