class_docstr: Generic network abstraction.
  
  Acts as a convenience wrapper for a parameterized network construction
  function, providing several utility methods and convenient access to
  the inputs/outputs/weights.
  
  Network objects can be safely pickled and unpickled for long-term
  archival purposes. The pickling works reliably as long as the underlying
  network construction function is defined in a standalone Python module
  that has no side effects or application-specific imports.
  
  Args:
      name: Network name. Used to select TensorFlow name and variable scopes.
      func_name: Fully qualified name of the underlying network construction function, or a top-level function object.
      static_kwargs: Keyword arguments to be passed in to the network construction function.
  
  Attributes:
      name: User-specified name, defaults to build func name if None.
      scope: Unique TensorFlow scope containing template graph and variables, derived from the user-specified name.
      static_kwargs: Arguments passed to the user-supplied build func.
      components: Container for sub-networks. Passed to the build func, and retained between calls.
      num_inputs: Number of input tensors.
      num_outputs: Number of output tensors.
      input_shapes: Input tensor shapes (NC or NCHW), including minibatch dimension.
      output_shapes: Output tensor shapes (NC or NCHW), including minibatch dimension.
      input_shape: Short-hand for input_shapes[0].
      output_shape: Short-hand for output_shapes[0].
      input_templates: Input placeholders in the template graph.
      output_templates: Output tensors in the template graph.
      input_names: Name string for each input.
      output_names: Name string for each output.
      own_vars: Variables defined by this network (local_name => var), excluding sub-networks.
      vars: All variables (local_name => var).
      trainables: All trainable variables (local_name => var).
      var_global_to_local: Mapping from variable global names to local names.
class_docstr_tok: ["Generic","network","abstraction",".","Acts","as","a","convenience","wrapper","for","a","parameterized","network","construction","function",",","providing","several","utility","methods","and","convenient","access","to","the","inputs\/outputs\/weights",".","Network","objects","can","be","safely","pickled","and","unpickled","for","long-term","archival","purposes",".","The","pickling","works","reliably","as","long","as","the","underlying","network","construction","function","is","defined","in","a","standalone","Python","module","that","has","no","side","effects","or","application-specific","imports",".","Args",":","name",":","Network","name",".","Used","to","select","TensorFlow","name","and","variable","scopes",".","func_name",":","Fully","qualified","name","of","the","underlying","network","construction","function",",","or","a","top-level","function","object",".","static_kwargs",":","Keyword","arguments","to","be","passed","in","to","the","network","construction","function",".","Attributes",":","name",":","User-specified","name",",","defaults","to","build","func","name","if","None",".","scope",":","Unique","TensorFlow","scope","containing","template","graph","and","variables",",","derived","from","the","user-specified","name",".","static_kwargs",":","Arguments","passed","to","the","user-supplied","build","func",".","components",":","Container","for","sub-networks",".","Passed","to","the","build","func",",","and","retained","between","calls",".","num_inputs",":","Number","of","input","tensors",".","num_outputs",":","Number","of","output","tensors",".","input_shapes",":","Input","tensor","shapes","(","NC","or","NCHW",")",",","including","minibatch","dimension",".","output_shapes",":","Output","tensor","shapes","(","NC","or","NCHW",")",",","including","minibatch","dimension",".","input_shape",":","Short-hand","for","input_shapes","[","0","]",".","output_shape",":","Short-hand","for","output_shapes","[","0","]",".","input_templates",":","Input","placeholders","in","the","template","graph",".","output_templates",":","Output","tensors","in","the","template","graph",".","input_names",":","Name","string","for","each","input",".","output_names",":","Name","string","for","each","output",".","own_vars",":","Variables","defined","by","this","network","(","local_name","=",">","var",")",",","excluding","sub-networks",".","vars",":","All","variables","(","local_name","=",">","var",")",".","trainables",":","All","trainable","variables","(","local_name","=",">","var",")",".","var_global_to_local",":","Mapping","from","variable","global","names","to","local","names","."]
docstr: Pickle import.
docstr_tok: ["Pickle","import","."]
code: def __setstate__(self, state: dict) -> None:
      """Pickle import."""
      # pylint: disable=attribute-defined-outside-init
      tfutil.assert_tf_initialized()
      self._init_fields()
  
      # Execute custom import handlers.
      for handler in _import_handlers:
          state = handler(state)
  
      # Set basic fields.
      assert state["version"] in [2, 3, 4]
      self.name = state["name"]
      self.static_kwargs = util.EasyDict(state["static_kwargs"])
      self.components = util.EasyDict(state.get("components", {}))
      self._build_module_src = state["build_module_src"]
      self._build_func_name = state["build_func_name"]
  
      # Create temporary module from the imported source code.
      module_name = "_tflib_network_import_" + uuid.uuid4().hex
      module = types.ModuleType(module_name)
      sys.modules[module_name] = module
      _import_module_src[module] = self._build_module_src
      exec(
          self._build_module_src, module.__dict__
      )  # pylint: disable=exec-used
  
      # Locate network build function in the temporary module.
      self._build_func = util.get_obj_from_module(
          module, self._build_func_name
      )
      assert callable(self._build_func)
  
      # Init TensorFlow graph.
      self._init_graph()
      self.reset_own_vars()
      tfutil.set_vars(
          {
              self.find_var(name): value
              for name, value in state["variables"]
          }
      )
  
imports: import types
  import inspect
  import re
  import uuid
  import sys
  import numpy
  import tensorflow
  from collections import OrderedDict
  from typing import Any, List, Tuple, Union
  from .None import tfutil
  from ..None import util
  from .tfutil import TfExpression, TfExpressionEx
label_desc: Use image node_id 13 for calling the Network obj's underlying member method code with example usage: obj.__setstate__(state) without return types