class_docstr: Class for representing a constraint using an input network.
  
  This constraint class uses an input network to compute the action feasibility.
  It assumes that the input network is already trained and it can be provided
  at construction time or later using the set_network() function.
class_docstr_tok: ["Class","for","representing","a","constraint","using","an","input","network",".","This","constraint","class","uses","an","input","network","to","compute","the","action","feasibility",".","It","assumes","that","the","input","network","is","already","trained","and","it","can","be","provided","at","construction","time","or","later","using","the","set_network","(",")","function","."]
docstr: Creates a constraint using an input network.
  
  Args:
    time_step_spec: A `TimeStep` spec of the expected time_steps.
    action_spec: A nest of `BoundedTensorSpec` representing the actions.
    input_network: An instance of `tf_agents.network.Network` used to provide
      estimates of action feasibility.
    name: Python str name of this agent. All variables in this module will
      fall under that name. Defaults to the class name.
code: def __init__(
      self,
      time_step_spec: types.TimeStep,
      action_spec: types.BoundedTensorSpec,
      input_network: Optional[types.Network] = None,
      name: Optional[Text] = "InputNetworkConstraint",
  ):
      """Creates a constraint using an input network.
  
      Args:
        time_step_spec: A `TimeStep` spec of the expected time_steps.
        action_spec: A nest of `BoundedTensorSpec` representing the actions.
        input_network: An instance of `tf_agents.network.Network` used to provide
          estimates of action feasibility.
        name: Python str name of this agent. All variables in this module will
          fall under that name. Defaults to the class name.
      """
      super(InputNetworkConstraint, self).__init__(
          time_step_spec, action_spec, name
      )
      self._num_actions = (
          policy_utilities.get_num_actions_from_tensor_spec(action_spec)
      )
      self._network = input_network
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import functools
  from typing import Callable, Iterable, Optional, Text
  import six
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.policies import loss_utils
  from tf_agents.bandits.specs import utils
  from tf_agents.policies import utils
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 1 to create a new InputNetworkConstraint object from inherited base classes: BaseConstraint with example: obj = InputNetworkConstraint(time_step_spec, action_spec, input_network, name)