between time steps, call reorder_incremental_state.
if incremental_state is None:
return super().forward(input)
// reshape weight
weight = self._get_linearized_weight()
kw = self.kernel_size[0]
After Change
between time steps, call reorder_incremental_state.
if incremental_state is None:
output = super().forward(input)
if self.kernel_size[0] > 1 and self.padding[0] > 0:
// remove future timesteps added by padding
output = output[:-self.padding[0], :, :]
return output
// reshape weight
weight = self._get_linearized_weight()
kw = self.kernel_size[0]