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: Returns an initial state usable by the network.
  
  Args:
    batch_size: Tensor or constant: size of the batch dimension. Can be None
      in which case not dimensions gets added.
  
  Returns:
    A nested object of type `self.state_spec` containing properly
    initialized Tensors.
docstr_tok: ["Returns","an","initial","state","usable","by","the","network",".","Args",":","batch_size",":","Tensor","or","constant",":","size","of","the","batch","dimension",".","Can","be","None","in","which","case","not","dimensions","gets","added",".","Returns",":","A","nested","object","of","type","`","self.state_spec","`","containing","properly","initialized","Tensors","."]
code: def get_initial_state(self, batch_size=None):
      """Returns an initial state usable by the network.
  
      Args:
        batch_size: Tensor or constant: size of the batch dimension. Can be None
          in which case not dimensions gets added.
  
      Returns:
        A nested object of type `self.state_spec` containing properly
        initialized Tensors.
      """
      return self._get_initial_state(batch_size)
  
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 13 for calling the Network obj's underlying member method code with example usage: obj.get_initial_state(batch_size) and returns: self