(self, x)
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.
Executes this layer as part of a forward pass through the model.
Executes this layer as part of a forward pass through the model .
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
def forward ( self , x ) : 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