class_docstr: A simple wrapper to easily create "linear" graph,
  consisting of layers / symbolic functions with only one input & output.
class_docstr_tok: ["A","simple","wrapper","to","easily","create","``","linear","''","graph",",","consisting","of","layers","\/","symbolic","functions","with","only","one","input","&","output","."]
code: def __getattr__(self, layer_name):
      layer = get_registered_layer(layer_name)
      if layer is not None:
          # this is a registered tensorpack layer
          # parse arguments by tensorpack model convention
          if layer.use_scope:
  
              def layer_func(name, *args, **kwargs):
                  ret = layer(name, self._t, *args, **kwargs)
                  return LinearWrap(ret)
  
          else:
  
              def layer_func(*args, **kwargs):
                  if len(args) and isinstance(
                      args[0], six.string_types
                  ):
                      name, args = args[0], args[1:]
                      ret = layer(name, self._t, *args, **kwargs)
                  else:
                      ret = layer(self._t, *args, **kwargs)
                  return LinearWrap(ret)
  
          return layer_func
      else:
          assert layer_name == "tf", (
              "Calling LinearWrap.{}:"
              " neither a layer nor 'tf'! "
              "Did you forget to extract tensor from LinearWrap?".format(
                  layer_name
              )
          )
          import tensorflow as layer  # noqa
  
          assert isinstance(layer, ModuleType), layer
          return LinearWrap._TFModuleFunc(layer, self._t)
  
file_path: tensorpack/tensorpack/models/linearwrap.py
imports: from types import ModuleType
  import six
  from .registry import get_registered_layer
label_desc: Use image node_id 2 for calling the LinearWrap obj's underlying member method code with example usage: obj.__getattr__(layer_name) and returns: layer_func, LinearWrap, LinearWrap, LinearWrap