class_docstr: The `NestMap` network processes nested inputs via nested layers.
  
  It is a TF-Agents network that can be used to process nested inputs.
  
  Stateful Keras layers (e.g. LSTMCell, RNN, LSTM, TF-Agents DynamicUnroll)
  are all supported.  The `state_spec` of `NestMap` has a structure matching
  that of `nested_layers`.
  
  `NestMap` can be used in conjunction with `NestFlatten` and a combiner
  (e.g. `tf.keras.layers.Add` or `tf.keras.layers.Concatenate`) to process
  and aggregate in a preprocessing step.
  
  Usage:
  ```python
  net = NestMap({"inp1": layer1, "inp2": layer2})
  outputs, next_state = net({"inp1": inp1, "inp2": inp2}, state)
  ```
class_docstr_tok: ["The","`","NestMap","`","network","processes","nested","inputs","via","nested","layers",".","It","is","a","TF-Agents","network","that","can","be","used","to","process","nested","inputs",".","Stateful","Keras","layers","(","e.g",".","LSTMCell",",","RNN",",","LSTM",",","TF-Agents","DynamicUnroll",")","are","all","supported",".","The","`","state_spec","`","of","`","NestMap","`","has","a","structure","matching","that","of","`","nested_layers","`",".","`","NestMap","`","can","be","used","in","conjunction","with","`","NestFlatten","`","and","a","combiner","(","e.g",".","`","tf.keras.layers.Add","`","or","`","tf.keras.layers.Concatenate","`",")","to","process","and","aggregate","in","a","preprocessing","step",".","Usage",":","``","`","python","net","=","NestMap","(","{","``","inp1","''",":","layer1",",","``","inp2","''",":","layer2","}",")","outputs",",","next_state","=","net","(","{","``","inp1","''",":","inp1",",","``","inp2","''",":","inp2","}",",","state",")","``","`"]
docstr: Make a copy of a `NestMap` instance.
  
  **NOTE** A copy of a `NestMap` instance always performs a deep copy
  of the underlying layers, so the new instance will not share weights
  with the original - but it will start with the same weights.
  
  Args:
    **kwargs: Args to override when recreating this network.  Commonly
      overridden args include 'name'.
  
  Returns:
    A deep copy of this network.
docstr_tok: ["Make","a","copy","of","a","`","NestMap","`","instance",".","*","*","NOTE","*","*","A","copy","of","a","`","NestMap","`","instance","always","performs","a","deep","copy","of","the","underlying","layers",",","so","the","new","instance","will","not","share","weights","with","the","original","-","but","it","will","start","with","the","same","weights",".","Args",":","*","*","kwargs",":","Args","to","override","when","recreating","this","network",".","Commonly","overridden","args","include","'name","'",".","Returns",":","A","deep","copy","of","this","network","."]
code: def copy(self, **kwargs) -> "NestMap":
      """Make a copy of a `NestMap` instance.
  
      **NOTE** A copy of a `NestMap` instance always performs a deep copy
      of the underlying layers, so the new instance will not share weights
      with the original - but it will start with the same weights.
  
      Args:
        **kwargs: Args to override when recreating this network.  Commonly
          overridden args include 'name'.
  
      Returns:
        A deep copy of this network.
      """
      new_kwargs = dict(self._saved_kwargs, **kwargs)
      if "nested_layers" not in new_kwargs:
          new_nested_layers = [
              copy.deepcopy(m) for m in self._nested_layers
          ]
          new_kwargs["nested_layers"] = new_nested_layers
      return type(self)(**new_kwargs)
  
file_path: agents/tf_agents/networks/nest_map.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import typing
  import tensorflow.compat.v2
  from tf_agents.networks import network
  from tf_agents.networks import sequential
  from tf_agents.typing import types
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 3 for calling the NestMap obj's underlying member method code with example usage: obj.copy() and returns: type