(self, inpt)
| 101 | self.bias = Variable(torch.zeros(1, num_features, 1, 1), requires_grad=False) |
| 102 | |
| 103 | def forward(self, inpt): |
| 104 | # inpt: (B,C,T,F) |
| 105 | ins_mean = torch.mean(inpt, dim=[1,3], keepdim=True) # (B,C,T,1) |
| 106 | ins_std = (torch.std(inpt, dim=[1,3], keepdim=True) + self.eps).pow(0.5) # (B,C,T,1) |
| 107 | x = (inpt - ins_mean) / ins_std |
| 108 | return x * self.gain.expand_as(x).type(x.type()) + self.bias.expand_as(x).type(x.type()) |
| 109 | |
| 110 | |
| 111 |
nothing calls this directly
no outgoing calls
no test coverage detected