def _EvaluateConvKernel(self, theta, inputs):
    'Apply convolution to inputs.'
    p = self.params
    assert (p.filter_shape[1] == 1), 'Only 1D causal convolutions supported.'
    padding_algorithm = 'VALID'
    causal_pad_size = ((p.filter_shape[0] - 1) * p.dilation_rate[0])
    inputs = tf.pad(inputs, [[0, 0], [causal_pad_size, 0], [0, 0], [0, 0]])
    filter_w = self._GetWeight(theta)
    return tf.nn.convolution(inputs, filter_w, strides=p.filter_stride, dilation_rate=p.dilation_rate, data_format='NHWC', padding=padding_algorithm)
Apply convolution to inputs.
def _EvaluateConvKernel(self, theta, inputs):
    
    p = self.params
    assert (p.filter_shape[1] == 1), 'Only 1D causal convolutions supported.'
    padding_algorithm = 'VALID'
    causal_pad_size = ((p.filter_shape[0] - 1) * p.dilation_rate[0])
    inputs = tf.pad(inputs, [[0, 0], [causal_pad_size, 0], [0, 0], [0, 0]])
    filter_w = self._GetWeight(theta)
    return tf.nn.convolution(inputs, filter_w, strides=p.filter_stride, dilation_rate=p.dilation_rate, data_format='NHWC', padding=padding_algorithm)