class_docstr: Base class for parametrized ("degenerate") policies.
class_docstr_tok: ["Base","class","for","parametrized","(","``","degenerate","''",")","policies","."]
code: def __init__(self, network="auto", *, inputs_spec, outputs=None):
      # Assumed to be secondary base class, so super() constructor has already been called
      assert hasattr(self, "name")
  
      # Network
      if isinstance(network, tf.keras.Model) or (
          isinstance(network, type)
          and issubclass(network, tf.keras.Model)
      ):
          network = dict(type="keras", model=network)
      self.network = self.submodule(
          name="network",
          module=network,
          modules=network_modules,
          inputs_spec=inputs_spec,
          outputs=outputs,
      )
      output_spec = self.network.output_spec()
      if isinstance(output_spec, TensorsSpec):
          for name, spec in output_spec.items():
              if spec.type != "float":
                  raise TensorforceError.type(
                      name="ParametrizedPolicy",
                      argument="network {} output".format(name),
                      dtype=spec.type,
                  )
      else:
          if output_spec.type != "float":
              raise TensorforceError.type(
                  name="ParametrizedPolicy",
                  argument="network output",
                  dtype=output_spec.type,
              )
  
file_path: tensorforce/tensorforce/core/policies/parametrized_policy.py
imports: import tensorflow
  from tensorforce import TensorforceError
  from tensorforce.core import network_modules, TensorsSpec, tf_function
  from tensorforce.core.policies import BasePolicy
label_desc: Use image node_id 1 to create a new ParametrizedPolicy object from inherited base classes: BasePolicy with example: obj = ParametrizedPolicy(network)