def conv1d_sc(input, filters, image_shape=None, filter_shape=None, border_mode='valid', subsample=(1,), filter_flip=True):
 if (border_mode not in ('valid', 0, (0,))):
  raise RuntimeError(('Unsupported border_mode for conv1d_sc: %s' % border_mode))
 if (image_shape is None):
  image_shape_sc = None
 else:
  image_shape_sc = (image_shape[0], 1, image_shape[1], image_shape[2])
 if (filter_shape is None):
  filter_shape_sc = None
 else:
  filter_shape_sc = (filter_shape[0], 1, filter_shape[1], filter_shape[2])
 input_sc = input.dimshuffle(0, 'x', 1, 2)
 filters_sc = filters.dimshuffle(0, 'x', 1, 2)[:, :, ::(-1), :]
 conved = T.nnet.conv2d(input_sc, filters_sc, image_shape_sc, filter_shape_sc, subsample=(1, subsample[0]), filter_flip=filter_flip)
 return conved[:, :, 0, :]

def conv1d_sc ( input , filters , image_shape = None , filter_shape = None , border_mode = 'valid' , subsample = ( 1 , ) , filter_flip = True ) : if ( border_mode not in ( 'valid' , 0 , ( 0 , ) ) ) : raise RuntimeError ( ( 'Unsupported border_mode for conv1d_sc: %s' % border_mode ) ) if ( image_shape is None ) : image_shape_sc = None else : image_shape_sc = ( image_shape [ 0 ] , 1 , image_shape [ 1 ] , image_shape [ 2 ] ) if ( filter_shape is None ) : filter_shape_sc = None else : filter_shape_sc = ( filter_shape [ 0 ] , 1 , filter_shape [ 1 ] , filter_shape [ 2 ] ) input_sc = input . dimshuffle ( 0 , 'x' , 1 , 2 ) filters_sc = filters . dimshuffle ( 0 , 'x' , 1 , 2 ) [ : , : , : : ( - 1 ) , : ] conved = T . nnet . conv2d ( input_sc , filters_sc , image_shape_sc , filter_shape_sc , subsample = ( 1 , subsample [ 0 ] ) , filter_flip = filter_flip ) return conved [ : , : , 0 , : ]
using conv2d with a single input channel .