class_docstr: Exponentially Q-weighted policy.
  
  Given a stochastic policy and a critic, returns a (stochastic) policy which
  samples multiple actions from the underlying policy, computes the Q-values for
  each action, and chooses the final action among the sampled ones with
  probability proportional to the exponentiated Q values, tempered by
  a parameter beta.
class_docstr_tok: ["Exponentially","Q-weighted","policy",".","Given","a","stochastic","policy","and","a","critic",",","returns","a","(","stochastic",")","policy","which","samples","multiple","actions","from","the","underlying","policy",",","computes","the","Q-values","for","each","action",",","and","chooses","the","final","action","among","the","sampled","ones","with","probability","proportional","to","the","exponentiated","Q","values",",","tempered","by","a","parameter","beta","."]
code: def __init__(
      self,
      actor_network: snt.Module,
      critic_network: snt.Module,
      beta: float = 1.0,
      num_action_samples: int = 16,
  ):
      super().__init__(name="ExpQWeightedPolicy")
      self._actor_network = actor_network
      self._critic_network = critic_network
      self._num_action_samples = num_action_samples
      self._beta = beta
  
file_path: acme/acme/tf/networks/stochastic.py
imports: from acme import types
  from acme.tf import utils
  import sonnet
  import tensorflow
  import tensorflow_probability
  import tree
label_desc: Use image node_id 1 to create a new ExpQWeightedPolicy object from inherited base classes: snt with example: obj = ExpQWeightedPolicy(actor_network, critic_network, beta, num_action_samples)