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","."]
docstr: Apply a function on the wrapped tensor. The tensor
  will be the second argument of func.
  
  This is because many symbolic functions
  (such as tensorpack's layers) takes 'scope' as the first argument.
  
  Returns:
      LinearWrap: ``LinearWrap(func(args[0], self.tensor(), *args[1:], **kwargs))``.
docstr_tok: ["Apply","a","function","on","the","wrapped","tensor",".","The","tensor","will","be","the","second","argument","of","func",".","This","is","because","many","symbolic","functions","(","such","as","tensorpack","'s","layers",")","takes","'scope","'","as","the","first","argument",".","Returns",":","LinearWrap",":","``","LinearWrap","(","func","(","args","[","0","]",",","self.tensor","(",")",",","*","args","[","1",":","]",",","*","*","kwargs",")",")","``","."]
code: def apply2(self, func, *args, **kwargs):
      """
      Apply a function on the wrapped tensor. The tensor
      will be the second argument of func.
  
      This is because many symbolic functions
      (such as tensorpack's layers) takes 'scope' as the first argument.
  
      Returns:
          LinearWrap: ``LinearWrap(func(args[0], self.tensor(), *args[1:], **kwargs))``.
      """
      ret = func(args[0], self._t, *(args[1:]), **kwargs)
      return LinearWrap(ret)
  
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 4 for calling the LinearWrap obj's underlying member method code with example usage: obj.apply2(func) and returns: LinearWrap