Method
__init__
(
self,
in_channels: int,
out_channels: int,
kernel_size: int,
)
Source from the content-addressed store, hash-verified
| 77 | # A causal variant of Conv1d |
| 78 | class CausalConv1d(torch.nn.Conv1d): |
| 79 | def __init__( |
| 80 | self, |
| 81 | in_channels: int, |
| 82 | out_channels: int, |
| 83 | kernel_size: int, |
| 84 | ) -> None: |
| 85 | super(CausalConv1d, self).__init__(in_channels, out_channels, kernel_size) |
| 86 | self.causal_padding = (kernel_size - 1, 0) |
| 87 | |
| 88 | def forward(self, x: torch.Tensor): |
| 89 | x = F.pad(x, self.causal_padding) |
Callers
nothing calls this directly
Tested by
no test coverage detected