class_docstr: Tests for policy_entropy op.
class_docstr_tok: ["Tests","for","policy_entropy","op","."]
code: def testRun(self):
      policies, _, scale_op = _setup_pgops_mock(
          sequence_length=3, batch_size=2, num_policies=3
      )
      loss, extra = pg_ops.policy_entropy_loss(
          policies, scale_op=scale_op
      )
      expected_entropy = [[0.0, 14.0], [28.0, 42.0], [56.0, 70.0]]
      expected_scaling = 3
      expected_loss = -expected_scaling * np.array(expected_entropy)
      with self.test_session() as sess:
          # Expected values are from manual calculation in a Colab.
          self.assertAllEqual(sess.run(extra.entropy), expected_entropy)
          self.assertAllEqual(sess.run(loss), expected_loss)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  from six.moves import xrange
  import tensorflow.compat.v1
  import tensorflow_probability
  import tree
  from trfl import policy_gradient_ops
label_desc: Use image node_id 5 for calling the EntropyCostTest obj's underlying member method code with example usage: obj.testRun() without return types