#NEWLINE# def transform( self , inputs ) : #NEWLINE# #INDENT# 'Transform the inputs for this layer into an output for the layer.\n\n        Parameters\n        ----------\n        inputs : dict of Theano expressions\n            Symbolic inputs to this layer, given as a dictionary mapping string\n            names to Theano expressions. See :func:`Layer.connect`.\n\n        Returns\n        -------\n        outputs : dict of Theano expressions\n            A map from string output names to Theano expressions for the outputs\n            from this layer. This layer type generates a "pre" output that gives\n            the unit activity before applying the layer\'s activation function,\n            and an "out" output that gives the post-activation output.\n        updates : list of update pairs\n            An empty list of updates to apply from this layer.\n        ' #NEWLINE# def _dot( x , y ) : #NEWLINE# #INDENT# if isinstance ( x , SS . SparseVariable ) : #NEWLINE# #INDENT# return SS . structured_dot ( x , y ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return TT . dot ( x , y ) #NEWLINE# #UNINDENT# #UNINDENT# def weight( n ) : #NEWLINE# #INDENT# return ( 'w' if ( len ( self . inputs ) == 1 ) else 'w_{}' . format ( n ) ) #NEWLINE# #UNINDENT# xws = ( ( inputs [ n ] , self . find ( weight ( n ) ) ) for n in self . inputs ) #NEWLINE# pre = ( sum ( ( _dot ( x , w ) for ( x , w ) in xws ) ) + self . find ( 'b' ) ) #NEWLINE# return ( dict ( pre = pre , out = self . activate ( pre ) ) , [ ] )