class_docstr: Computes the number of suboptimal arms with respect to a baseline.
class_docstr_tok: ["Computes","the","number","of","suboptimal","arms","with","respect","to","a","baseline","."]
docstr: Computes the number of suboptimal arms with respect to a baseline.
  
  Args:
    baseline_action_fn: function that computes the action used as a baseline
      for computing the metric.
    name: (str) name of the metric
    dtype: dtype of the metric value.
docstr_tok: ["Computes","the","number","of","suboptimal","arms","with","respect","to","a","baseline",".","Args",":","baseline_action_fn",":","function","that","computes","the","action","used","as","a","baseline","for","computing","the","metric",".","name",":","(","str",")","name","of","the","metric","dtype",":","dtype","of","the","metric","value","."]
code: def __init__(
      self,
      baseline_action_fn: Callable[[types.Tensor], types.Tensor],
      name: Optional[Text] = "SuboptimalArmsMetric",
      dtype: float = tf.float32,
  ):
      """Computes the number of suboptimal arms with respect to a baseline.
  
      Args:
        baseline_action_fn: function that computes the action used as a baseline
          for computing the metric.
        name: (str) name of the metric
        dtype: dtype of the metric value.
      """
      self._baseline_action_fn = baseline_action_fn
      self.dtype = dtype
      self.suboptimal_arms = common.create_variable(
          initial_value=0,
          dtype=self.dtype,
          shape=(),
          name="suboptimal_arms",
      )
      super(SuboptimalArmsMetric, self).__init__(name=name)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Callable, Optional, Text
  import gin
  import tensorflow
  from tf_agents.bandits.policies import constraints
  from tf_agents.bandits.specs import utils
  from tf_agents.metrics import tf_metric
  from tf_agents.typing import types
  from tf_agents.utils import common
label_desc: Use image node_id 1 to create a new SuboptimalArmsMetric object from inherited base classes: tf_metric with example: obj = SuboptimalArmsMetric(baseline_action_fn, name, dtype)