1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-18 11:40:18 +01:00

bug-fix for l2_regularization not in use (#230)

* bug-fix for l2_regularization not in use
* removing not in use TF REGULARIZATION_LOSSES collection
This commit is contained in:
Gal Leibovich
2019-03-03 15:11:06 +02:00
committed by Gal Novik
parent 10220be9be
commit 9a895a1ac7
5 changed files with 21 additions and 22 deletions

View File

@@ -78,8 +78,6 @@ class PolicyHead(Head):
self.entropy = tf.add_n([tf.reduce_mean(dist.entropy()) for dist in self.policy_distributions])
self.regularizations += [-tf.multiply(self.beta, self.entropy, name='entropy_regularization')]
tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES, self.regularizations)
# calculate loss
self.action_log_probs_wrt_policy = \
tf.add_n([dist.log_prob(action) for dist, action in zip(self.policy_distributions, self.actions)])