#NEWLINE# def make_node( self , img , kern , output , desc , alpha = None , beta = None ) : #NEWLINE# #INDENT# img = as_cuda_ndarray_variable ( img ) #NEWLINE# kern = as_cuda_ndarray_variable ( kern ) #NEWLINE# output = as_cuda_ndarray_variable ( output ) #NEWLINE# if ( img . type . ndim != 5 ) : #NEWLINE# #INDENT# raise TypeError ( 'img must be 5D tensor' ) #NEWLINE# #UNINDENT# if ( kern . type . ndim != 5 ) : #NEWLINE# #INDENT# raise TypeError ( 'kern must be 5D tensor' ) #NEWLINE# #UNINDENT# if ( output . type . ndim != 5 ) : #NEWLINE# #INDENT# raise TypeError ( 'output must be a 5D tensor' ) #NEWLINE# #UNINDENT# if ( ( not isinstance ( desc . type , CDataType ) ) or ( desc . type . ctype != 'cudnnConvolutionDescriptor_t' ) ) : #NEWLINE# #INDENT# raise TypeError ( 'desc must be cudnnConvolutionDescriptor_t' ) #NEWLINE# #UNINDENT# alpha = ensure_float ( alpha , _one , 'alpha' ) #NEWLINE# beta = ensure_float ( beta , _zero , 'beta' ) #NEWLINE# return Apply ( self , [ img , kern , output , desc , alpha , beta ] , [ output . type ( ) ] )