(self, x)
| 95 | self.padding_mode=padding_mode |
| 96 | |
| 97 | def forward(self, x): |
| 98 | w= torch._weight_norm(self.weight, self.g, 0) |
| 99 | |
| 100 | |
| 101 | |
| 102 | if self.padding_mode != 'zeros': |
| 103 | x= F.pad(x, (self.padding_amount,self.padding_amount), mode=self.padding_mode) |
| 104 | |
| 105 | x= F.conv1d( |
| 106 | x, |
| 107 | w, |
| 108 | bias=self.bias, |
| 109 | stride=self.stride, |
| 110 | padding=0, |
| 111 | dilation=self.dilation, |
| 112 | groups=self.groups, |
| 113 | ) |
| 114 | # print("x after conv", x.shape) |
| 115 | return x |
| 116 | else: |
| 117 | |
| 118 | return F.conv1d( |
| 119 | x, |
| 120 | w, |
| 121 | bias=self.bias, |
| 122 | stride=self.stride, |
| 123 | padding=self.padding, |
| 124 | dilation=self.dilation, |
| 125 | groups=self.groups, |
| 126 | ) |
| 127 | |
| 128 | |
| 129 | def kaiming_init(m, is_linear, nonlinearity="silu"): |
nothing calls this directly
no outgoing calls
no test coverage detected