code: def conv1d_mc1(
      input,
      filters,
      image_shape=None,
      filter_shape=None,
      border_mode="valid",
      subsample=(1,),
      filter_flip=True,
      num_groups=1,
  ):
      """
      using conv2d with height == 1
      """
      if image_shape is None:
          image_shape_mc1 = None
      else:
          # (b, c, i0) to (b, c, i0, 1)
          image_shape_mc1 = (
              image_shape[0],
              image_shape[1],
              image_shape[2],
              1,
          )
  
      if filter_shape is None:
          filter_shape_mc1 = None
      else:
          filter_shape_mc1 = (
              filter_shape[0],
              filter_shape[1],
              filter_shape[2],
              1,
          )
  
      if isinstance(border_mode, tuple):
          (border_mode,) = border_mode
      if isinstance(border_mode, int_types):
          border_mode = (border_mode, 0)
  
      input_mc1 = input.dimshuffle(0, 1, 2, "x")
      filters_mc1 = filters.dimshuffle(0, 1, 2, "x")
  
      extra_kwargs = (
          {"num_groups": num_groups} if num_groups > 1 else {}
      )
      conved = T.nnet.conv2d(
          input_mc1,
          filters_mc1,
          image_shape_mc1,
          filter_shape_mc1,
          subsample=(subsample[0], 1),
          border_mode=border_mode,
          filter_flip=filter_flip,
          **extra_kwargs,
      )
      return conved[:, :, :, 0]
  
file_path: Lasagne/lasagne/theano_extensions/conv.py
imports: import numpy
  import theano.tensor
  from ..utils import int_types
label_desc: Use image node_id 3 for calling a global function with example usage: conv1d_mc1(input, filters, image_shape, filter_shape, border_mode, subsample, filter_flip, num_groups) and returns: conved