class_docstr: A class used to represent networks used by TF-Agents policies and agents.
  
  The main differences between a TF-Agents Network and a Keras Layer include:
  networks keep track of their underlying layers, explicitly represent RNN-like
  state in inputs and outputs, and simplify variable creation and clone
  operations.
  
  When calling a network `net`, typically one passes data through it via:
  
  ```python
  outputs, next_state = net(observation, network_state=...)
  outputs, next_state = net(observation, step_type=..., network_state=...)
  outputs, next_state = net(observation)  # net.call must fill an empty state
  outputs, next_state = net(observation, step_type=...)
  outputs, next_state = net(
      observation, step_type=..., network_state=..., learning=...)
  ```
  
  etc.
  
  To force construction of a network's variables:
  ```python
  net.create_variables()
  net.create_variables(input_tensor_spec=...)  # To provide an input spec
  net.create_variables(training=True)  # Provide extra kwargs
  net.create_variables(input_tensor_spec, training=True)
  ```
  
  To create a copy of the network:
  ```python
  cloned_net = net.copy()
  cloned_net.variables  # Raises ValueError: cloned net does not share weights.
  cloned_net.create_variables(...)
  cloned_net.variables  # Now new variables have been created.
  ```
class_docstr_tok: ["A","class","used","to","represent","networks","used","by","TF-Agents","policies","and","agents",".","The","main","differences","between","a","TF-Agents","Network","and","a","Keras","Layer","include",":","networks","keep","track","of","their","underlying","layers",",","explicitly","represent","RNN-like","state","in","inputs","and","outputs",",","and","simplify","variable","creation","and","clone","operations",".","When","calling","a","network","`","net","`",",","typically","one","passes","data","through","it","via",":","``","`","python","outputs",",","next_state","=","net","(","observation",",","network_state=","...",")","outputs",",","next_state","=","net","(","observation",",","step_type=","...",",","network_state=","...",")","outputs",",","next_state","=","net","(","observation",")","#","net.call","must","fill","an","empty","state","outputs",",","next_state","=","net","(","observation",",","step_type=","...",")","outputs",",","next_state","=","net","(","observation",",","step_type=","...",",","network_state=","...",",","learning=","...",")","``","`","etc",".","To","force","construction","of","a","network","'s","variables",":","``","`","python","net.create_variables","(",")","net.create_variables","(","input_tensor_spec=","...",")","#","To","provide","an","input","spec","net.create_variables","(","training=True",")","#","Provide","extra","kwargs","net.create_variables","(","input_tensor_spec",",","training=True",")","``","`","To","create","a","copy","of","the","network",":","``","`","python","cloned_net","=","net.copy","(",")","cloned_net.variables","#","Raises","ValueError",":","cloned","net","does","not","share","weights",".","cloned_net.create_variables","(","...",")","cloned_net.variables","#","Now","new","variables","have","been","created",".","``","`"]
docstr: Prints a string summary of the network.
  
  Args:
      line_length: Total length of printed lines (e.g. set this to adapt the
        display to different terminal window sizes).
      positions: Relative or absolute positions of log elements in each line.
        If not provided, defaults to `[.33, .55, .67, 1.]`.
      print_fn: Print function to use. Defaults to `print`. It will be called
        on each line of the summary. You can set it to a custom function in
        order to capture the string summary.
  
  Raises:
      ValueError: if `summary()` is called before the model is built.
docstr_tok: ["Prints","a","string","summary","of","the","network",".","Args",":","line_length",":","Total","length","of","printed","lines","(","e.g",".","set","this","to","adapt","the","display","to","different","terminal","window","sizes",")",".","positions",":","Relative","or","absolute","positions","of","log","elements","in","each","line",".","If","not","provided",",","defaults","to","`","[",".33",",",".55",",",".67",",","1.","]","`",".","print_fn",":","Print","function","to","use",".","Defaults","to","`","print","`",".","It","will","be","called","on","each","line","of","the","summary",".","You","can","set","it","to","a","custom","function","in","order","to","capture","the","string","summary",".","Raises",":","ValueError",":","if","`","summary","(",")","`","is","called","before","the","model","is","built","."]
code: def summary(self, line_length=None, positions=None, print_fn=None):
      """Prints a string summary of the network.
  
      Args:
          line_length: Total length of printed lines (e.g. set this to adapt the
            display to different terminal window sizes).
          positions: Relative or absolute positions of log elements in each line.
            If not provided, defaults to `[.33, .55, .67, 1.]`.
          print_fn: Print function to use. Defaults to `print`. It will be called
            on each line of the summary. You can set it to a custom function in
            order to capture the string summary.
  
      Raises:
          ValueError: if `summary()` is called before the model is built.
      """
      if not self.built:
          raise ValueError(
              "This model has not yet been built. "
              "Build the model first by calling `build()` or "
              "`__call__()` with some data, or `create_variables()`."
          )
      layer_utils.print_summary(
          self,
          line_length=line_length,
          positions=positions,
          print_fn=print_fn,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import typing
  import six
  import tensorflow
  import tensorflow_probability
  from tf_agents.distributions import utils
  from tf_agents.networks import layer_utils
  from tf_agents.specs import tensor_spec
  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
  from tf_agents.utils import object_identity
  from tensorflow.python.trackable import base
  from tensorflow.python.util import tf_decorator
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 9 for calling the Network obj's underlying member method code with example usage: obj.summary(line_length, positions, print_fn) without return types