def conv1d(sequences, masks, **kwargs):
    # For testability
    sequences = tensor.as_tensor_variable(sequences)
    masks = tensor.as_tensor_variable(masks)
    image = sequences.dimshuffle('x', 'x', 0, 1)
    filters = masks.dimshuffle(0, 'x', 'x', 1)
    result = conv2d(image, filters, **kwargs)
    # Now number of rows is the actual batch size
    result = result.dimshuffle(2, 1, 3, 0)
    return result.reshape(result.shape[:-1], ndim=3)
Wraps Theano conv2d to perform 1D convolution.
dataset/ETHPy150Open rizar/attention-lvcsr/lvsr/expressions.py/conv1d