original_docstring: 
          wrapper around theano.function that allows reference node outputs
          with strings
  
          example:
          network.function(["input_node"], ["fc_node", "loss", ("conv1", "W")])
          
docstring: wrapper around theano.function that allows reference node outputs
  with strings
  
  
docstring_tokens: wrapper around theano . function that allows reference node outputs with strings
code: def function(self,
                   inputs,
                   outputs=None,
                   include_updates=False,
                   updates=None,
                   givens=None,
                   **kwargs):
          """
          wrapper around theano.function that allows reference node outputs
          with strings
  
          example:
          network.function(["input_node"], ["fc_node", "loss", ("conv1", "W")])
          """
          self.build()
          if outputs is None:
              outputs = []
          assert isinstance(inputs, list)
          assert isinstance(outputs, list)
  
          if include_updates:
              # combine update_deltas with manually specified updates
              if updates is None:
                  all_deltas = self.update_deltas
              else:
                  extra_updates = UpdateDeltas.from_updates(updates)
                  all_deltas = self.update_deltas + extra_updates
  
              # convert into format expected by theano.function
              updates = all_deltas.to_updates()
  
          transformed_inputs = [self.network_variable(i) for i in inputs]
          transformed_outputs = [self.network_variable(i) for i in outputs]
  
          if givens is None:
              tmp_givens = []
          elif isinstance(givens, dict):
              tmp_givens = list(givens.items())
          elif isinstance(givens, (list, tuple)):
              tmp_givens = list(givens)
          transformed_givens = [(self.network_variable(k), v)
                                for k, v in tmp_givens]
          fn = theano.function(inputs=transformed_inputs,
                               outputs=transformed_outputs,
                               updates=updates,
                               givens=transformed_givens,
                               **kwargs)
          return fn
code_tokens: def function ( self , inputs , outputs = None , include_updates = False , updates = None , givens = None , ** kwargs ) : self . build ( ) if outputs is None : outputs = [ ] assert isinstance ( inputs , list ) assert isinstance ( outputs , list ) if include_updates : if updates is None : all_deltas = self . update_deltas else : extra_updates = UpdateDeltas . from_updates ( updates ) all_deltas = self . update_deltas + extra_updates updates = all_deltas . to_updates ( ) transformed_inputs = [ self . network_variable ( i ) for i in inputs ] transformed_outputs = [ self . network_variable ( i ) for i in outputs ] if givens is None : tmp_givens = [ ] elif isinstance ( givens , dict ) : tmp_givens = list ( givens . items ( ) ) elif isinstance ( givens , ( list , tuple ) ) : tmp_givens = list ( givens ) transformed_givens = [ ( self . network_variable ( k ) , v ) for k , v in tmp_givens ] fn = theano . function ( inputs = transformed_inputs , outputs = transformed_outputs , updates = updates , givens = transformed_givens , ** kwargs ) return fn
short_docstring: wrapper around theano.function that allows reference node outputs
  with strings
short_docstring_tokens: wrapper around theano . function that allows reference node outputs with strings
comment: """
          wrapper around theano.function that allows reference node outputs
          with strings
  
          example:
          network.function(["input_node"], ["fc_node", "loss", ("conv1", "W")])
          """$SEP$# combine update_deltas with manually specified updates$SEP$# convert into format expected by theano.function