(self, dim, dim_out=None)
| 768 | |
| 769 | class TimeUpsample2x(Module): |
| 770 | def __init__(self, dim, dim_out=None): |
| 771 | super().__init__() |
| 772 | dim_out = default(dim_out, dim) |
| 773 | conv = nn.Conv1d(dim, dim_out * 2, 1) |
| 774 | |
| 775 | self.net = nn.Sequential(conv, nn.SiLU(), Rearrange("b (c p) t -> b c (t p)", p=2)) |
| 776 | |
| 777 | self.init_conv_(conv) |
| 778 | |
| 779 | def init_conv_(self, conv): |
| 780 | o, i, t = conv.weight.shape |
nothing calls this directly
no test coverage detected