def forward(self, x):
    """Executes this layer as part of a forward pass through the model.

    Args:
      x: Tensor of same shape and dtype as the input signature used to
          initialize this layer.

    Returns:
      Tensor of same shape and dtype as the input.
    """
    w = self.weights
    res = x * w[0, :][None, None, :]
    for i in range(1, self._kernel_size):
      x = _zero_pad(x, (1, 0), 1)
      x = x[:, :-1, :]
      res += x * w[i, :][None, None, :]
    return res
Executes this layer as part of a forward pass through the model.

    Args:
      x: Tensor of same shape and dtype as the input signature used to
          initialize this layer.

    Returns:
      Tensor of same shape and dtype as the input.
    
trax/layers/convolution.py