(
self,
inp_channels: int,
out_channels: int,
embed_dim: int,
kernel_size: int | tuple[int, int] = 5,
activation: str = "mish",
)
| 438 | """ |
| 439 | |
| 440 | def __init__( |
| 441 | self, |
| 442 | inp_channels: int, |
| 443 | out_channels: int, |
| 444 | embed_dim: int, |
| 445 | kernel_size: int | tuple[int, int] = 5, |
| 446 | activation: str = "mish", |
| 447 | ): |
| 448 | super().__init__() |
| 449 | self.conv_in = Conv1dBlock(inp_channels, out_channels, kernel_size) |
| 450 | self.conv_out = Conv1dBlock(out_channels, out_channels, kernel_size) |
| 451 | |
| 452 | self.time_emb_act = get_activation(activation) |
| 453 | self.time_emb = nn.Linear(embed_dim, out_channels) |
| 454 | |
| 455 | self.residual_conv = ( |
| 456 | nn.Conv1d(inp_channels, out_channels, 1) if inp_channels != out_channels else nn.Identity() |
| 457 | ) |
| 458 | |
| 459 | def forward(self, inputs: torch.Tensor, t: torch.Tensor) -> torch.Tensor: |
| 460 | """ |
nothing calls this directly
no test coverage detected