class_docstr: A neural reward network based bandit agent.
  
  This agent receives a neural network that it trains to predict rewards. The
  action is chosen greedily with respect to the prediction.
class_docstr_tok: ["A","neural","reward","network","based","bandit","agent",".","This","agent","receives","a","neural","network","that","it","trains","to","predict","rewards",".","The","action","is","chosen","greedily","with","respect","to","the","prediction","."]
code: def compute_summaries(
      self,
      loss: types.Tensor,
      constraint_loss: Optional[types.Tensor] = None,
  ):
      if self.summaries_enabled:
          with tf.name_scope("Losses/"):
              tf.compat.v2.summary.scalar(
                  name="loss", data=loss, step=self.train_step_counter
              )
              if constraint_loss is not None:
                  tf.compat.v2.summary.scalar(
                      name="constraint_loss",
                      data=constraint_loss,
                      step=self.train_step_counter,
                  )
  
          if self._summarize_grads_and_vars:
              with tf.name_scope("Variables/"):
                  for var in self._variables_to_train():
                      tf.compat.v2.summary.histogram(
                          name=var.name.replace(":", "_"),
                          data=var,
                          step=self.train_step_counter,
                      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Iterable, Optional, Sequence, Text, Tuple
  from absl import logging
  import gin
  import tensorflow
  from tf_agents.agents import data_converter
  from tf_agents.agents import tf_agent
  from tf_agents.bandits.agents import utils
  from tf_agents.bandits.networks import heteroscedastic_q_network
  from tf_agents.bandits.policies import constraints
  from tf_agents.bandits.policies import greedy_reward_prediction_policy
  from tf_agents.bandits.specs import utils
  from tf_agents.policies import utils
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import eager_utils
label_desc: Use image node_id 8 for calling the GreedyRewardPredictionAgent obj's underlying member method code with example usage: obj.compute_summaries(loss, constraint_loss) without return types