class_docstr: lasagne.layers.Conv1DLayer(incoming, num_filters, filter_size, stride=1,
  pad=0, untie_biases=False, W=lasagne.init.GlorotUniform(),
  b=lasagne.init.Constant(0.), nonlinearity=lasagne.nonlinearities.rectify,
  flip_filters=True, convolution=lasagne.theano_extensions.conv.conv1d_mc0,
  **kwargs)
  
  1D convolutional layer
  
  Performs a 1D convolution on its input and optionally adds a bias and
  applies an elementwise nonlinearity.
  
  Parameters
  ----------
  incoming : a :class:`Layer` instance or a tuple
      The layer feeding into this layer, or the expected input shape. The
      output of this layer should be a 3D tensor, with shape
      ``(batch_size, num_input_channels, input_length)``.
  
  num_filters : int
      The number of learnable convolutional filters this layer has.
  
  filter_size : int or iterable of int
      An integer or a 1-element tuple specifying the size of the filters.
  
  stride : int or iterable of int
      An integer or a 1-element tuple specifying the stride of the
      convolution operation.
  
  pad : int, iterable of int, 'full', 'same' or 'valid' (default: 0)
      By default, the convolution is only computed where the input and the
      filter fully overlap (a valid convolution). When ``stride=1``, this
      yields an output that is smaller than the input by ``filter_size - 1``.
      The `pad` argument allows you to implicitly pad the input with zeros,
      extending the output size.
  
      An integer or a 1-element tuple results in symmetric zero-padding of
      the given size on both borders.
  
      ``'full'`` pads with one less than the filter size on both sides. This
      is equivalent to computing the convolution wherever the input and the
      filter overlap by at least one position.
  
      ``'same'`` pads with half the filter size (rounded down) on both sides.
      When ``stride=1`` this results in an output size equal to the input
      size. Even filter size is not supported.
  
      ``'valid'`` is an alias for ``0`` (no padding / a valid convolution).
  
  untie_biases : bool (default: False)
      If ``False``, the layer will have a bias parameter for each channel,
      which is shared across all positions in this channel. As a result, the
      `b` attribute will be a vector (1D).
  
      If True, the layer will have separate bias parameters for each
      position in each channel. As a result, the `b` attribute will be a
      matrix (2D).
  
  W : Theano shared variable, expression, numpy array or callable
      Initial value, expression or initializer for the weights.
      These should be a 3D tensor with shape
      ``(num_filters, num_input_channels, filter_length)``.
      See :func:`lasagne.utils.create_param` for more information.
  
  b : Theano shared variable, expression, numpy array, callable or ``None``
      Initial value, expression or initializer for the biases. If set to
      ``None``, the layer will have no biases. Otherwise, biases should be
      a 1D array with shape ``(num_filters,)`` if `untied_biases` is set to
      ``False``. If it is set to ``True``, its shape should be
      ``(num_filters, input_length)`` instead.
      See :func:`lasagne.utils.create_param` for more information.
  
  nonlinearity : callable or None
      The nonlinearity that is applied to the layer activations. If None
      is provided, the layer will be linear.
  
  flip_filters : bool (default: True)
      Whether to flip the filters before sliding them over the input,
      performing a convolution (this is the default), or not to flip them and
      perform a correlation. Note that for some other convolutional layers in
      Lasagne, flipping incurs an overhead and is disabled by default --
      check the documentation when using learned weights from another layer.
  
  num_groups : int (default: 1)
      The number of groups to split the input channels and output channels
      into, such that data does not cross the group boundaries. Requires the
      number of channels to be divisible by the number of groups, and
      requires Theano 0.10 or later for more than one group.
  
  convolution : callable
      The convolution implementation to use. The
      `lasagne.theano_extensions.conv` module provides some alternative
      implementations for 1D convolutions, because the Theano API only
      features a 2D convolution implementation. Usually it should be fine
      to leave this at the default value. Note that not all implementations
      support all settings for `pad`, `subsample` and `num_groups`.
  
  **kwargs
      Any additional keyword arguments are passed to the `Layer` superclass.
  
  Attributes
  ----------
  W : Theano shared variable or expression
      Variable or expression representing the filter weights.
  
  b : Theano shared variable or expression
      Variable or expression representing the biases.
class_docstr_tok: ["lasagne.layers.Conv1DLayer","(","incoming",",","num_filters",",","filter_size",",","stride=1",",","pad=0",",","untie_biases=False",",","W=lasagne.init.GlorotUniform","(",")",",","b=lasagne.init.Constant","(","0",".",")",",","nonlinearity=lasagne.nonlinearities.rectify",",","flip_filters=True",",","convolution=lasagne.theano_extensions.conv.conv1d_mc0",",","*","*","kwargs",")","1D","convolutional","layer","Performs","a","1D","convolution","on","its","input","and","optionally","adds","a","bias","and","applies","an","elementwise","nonlinearity",".","Parameters","--","--","--","--","--","incoming",":","a",":","class",":","`","Layer","`","instance","or","a","tuple","The","layer","feeding","into","this","layer",",","or","the","expected","input","shape",".","The","output","of","this","layer","should","be","a","3D","tensor",",","with","shape","``","(","batch_size",",","num_input_channels",",","input_length",")","``",".","num_filters",":","int","The","number","of","learnable","convolutional","filters","this","layer","has",".","filter_size",":","int","or","iterable","of","int","An","integer","or","a","1-element","tuple","specifying","the","size","of","the","filters",".","stride",":","int","or","iterable","of","int","An","integer","or","a","1-element","tuple","specifying","the","stride","of","the","convolution","operation",".","pad",":","int",",","iterable","of","int",",","'full","'",",","'same","'","or","'valid","'","(","default",":","0",")","By","default",",","the","convolution","is","only","computed","where","the","input","and","the","filter","fully","overlap","(","a","valid","convolution",")",".","When","``","stride=1","``",",","this","yields","an","output","that","is","smaller","than","the","input","by","``","filter_size","-","1","``",".","The","`","pad","`","argument","allows","you","to","implicitly","pad","the","input","with","zeros",",","extending","the","output","size",".","An","integer","or","a","1-element","tuple","results","in","symmetric","zero-padding","of","the","given","size","on","both","borders",".","``","'full","'","``","pads","with","one","less","than","the","filter","size","on","both","sides",".","This","is","equivalent","to","computing","the","convolution","wherever","the","input","and","the","filter","overlap","by","at","least","one","position",".","``","'same","'","``","pads","with","half","the","filter","size","(","rounded","down",")","on","both","sides",".","When","``","stride=1","``","this","results","in","an","output","size","equal","to","the","input","size",".","Even","filter","size","is","not","supported",".","``","'valid","'","``","is","an","alias","for","``","0","``","(","no","padding","\/","a","valid","convolution",")",".","untie_biases",":","bool","(","default",":","False",")","If","``","False","``",",","the","layer","will","have","a","bias","parameter","for","each","channel",",","which","is","shared","across","all","positions","in","this","channel",".","As","a","result",",","the","`","b","`","attribute","will","be","a","vector","(","1D",")",".","If","True",",","the","layer","will","have","separate","bias","parameters","for","each","position","in","each","channel",".","As","a","result",",","the","`","b","`","attribute","will","be","a","matrix","(","2D",")",".","W",":","Theano","shared","variable",",","expression",",","numpy","array","or","callable","Initial","value",",","expression","or","initializer","for","the","weights",".","These","should","be","a","3D","tensor","with","shape","``","(","num_filters",",","num_input_channels",",","filter_length",")","``",".","See",":","func",":","`","lasagne.utils.create_param","`","for","more","information",".","b",":","Theano","shared","variable",",","expression",",","numpy","array",",","callable","or","``","None","``","Initial","value",",","expression","or","initializer","for","the","biases",".","If","set","to","``","None","``",",","the","layer","will","have","no","biases",".","Otherwise",",","biases","should","be","a","1D","array","with","shape","``","(","num_filters",",",")","``","if","`","untied_biases","`","is","set","to","``","False","``",".","If","it","is","set","to","``","True","``",",","its","shape","should","be","``","(","num_filters",",","input_length",")","``","instead",".","See",":","func",":","`","lasagne.utils.create_param","`","for","more","information",".","nonlinearity",":","callable","or","None","The","nonlinearity","that","is","applied","to","the","layer","activations",".","If","None","is","provided",",","the","layer","will","be","linear",".","flip_filters",":","bool","(","default",":","True",")","Whether","to","flip","the","filters","before","sliding","them","over","the","input",",","performing","a","convolution","(","this","is","the","default",")",",","or","not","to","flip","them","and","perform","a","correlation",".","Note","that","for","some","other","convolutional","layers","in","Lasagne",",","flipping","incurs","an","overhead","and","is","disabled","by","default","--","check","the","documentation","when","using","learned","weights","from","another","layer",".","num_groups",":","int","(","default",":","1",")","The","number","of","groups","to","split","the","input","channels","and","output","channels","into",",","such","that","data","does","not","cross","the","group","boundaries",".","Requires","the","number","of","channels","to","be","divisible","by","the","number","of","groups",",","and","requires","Theano","0.10","or","later","for","more","than","one","group",".","convolution",":","callable","The","convolution","implementation","to","use",".","The","`","lasagne.theano_extensions.conv","`","module","provides","some","alternative","implementations","for","1D","convolutions",",","because","the","Theano","API","only","features","a","2D","convolution","implementation",".","Usually","it","should","be","fine","to","leave","this","at","the","default","value",".","Note","that","not","all","implementations","support","all","settings","for","`","pad","`",",","`","subsample","`","and","`","num_groups","`",".","*","*","kwargs","Any","additional","keyword","arguments","are","passed","to","the","`","Layer","`","superclass",".","Attributes","--","--","--","--","--","W",":","Theano","shared","variable","or","expression","Variable","or","expression","representing","the","filter","weights",".","b",":","Theano","shared","variable","or","expression","Variable","or","expression","representing","the","biases","."]
code: def convolve(self, input, **kwargs):
      border_mode = "half" if self.pad == "same" else self.pad
      extra_kwargs = {}
      if self.num_groups > 1:  # pragma: no cover
          extra_kwargs["num_groups"] = self.num_groups
      conved = self.convolution(
          input,
          self.W,
          self.input_shape,
          self.get_W_shape(),
          subsample=self.stride,
          border_mode=border_mode,
          filter_flip=self.flip_filters,
          **extra_kwargs,
      )
      return conved
  
imports: import theano.tensor
  from ..None import init
  from ..None import nonlinearities
  from ..utils import as_tuple, int_types, inspect_kwargs
  from ..theano_extensions import conv
  from .base import Layer
label_desc: Use image node_id 2 for calling the Conv1DLayer obj's underlying member method code with example usage: obj.convolve(input) and returns: conved