class_docstr: A neural network based Thompson sampling agent.
  
  This agent receives parameters for a neural network and trains it to predict
  rewards. The action is chosen greedily with respect to the prediction.
  The neural network implements dropout for exploration.
class_docstr_tok: ["A","neural","network","based","Thompson","sampling","agent",".","This","agent","receives","parameters","for","a","neural","network","and","trains","it","to","predict","rewards",".","The","action","is","chosen","greedily","with","respect","to","the","prediction",".","The","neural","network","implements","dropout","for","exploration","."]
code: def _train(self, experience, weights):
      if callable(self._dropout_rate):
          dropout = self._dropout_rate()
      else:
          dropout = self._dropout_rate
      tf.compat.v2.summary.scalar(
          name="dropout", data=dropout, step=self.train_step_counter
      )
      return super(DropoutThompsonSamplingAgent, self)._train(
          experience, weights
      )
  
file_path: agents/tf_agents/bandits/agents/dropout_thompson_sampling_agent.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Iterable, Optional, Text, Tuple
  import gin
  import tensorflow
  from tf_agents.bandits.agents import greedy_reward_prediction_agent
  from tf_agents.bandits.networks import heteroscedastic_q_network
  from tf_agents.bandits.policies import constraints
  from tf_agents.networks import q_network
  from tf_agents.typing import types
label_desc: Use image node_id 2 for calling the DropoutThompsonSamplingAgent obj's underlying member method code with example usage: obj._train(experience, weights) and returns: super