def forward(self, input):
        x = torch.conv_tbc(input.contiguous(), self.weight,
                           self.bias, self.padding[0])

        #print(x.size())
        #print(x)

        #return F.glu(x, dim=0), x
        # TODO: our target
        return convtbcglu.forward(input.contiguous(), self.weight,
                                  self.bias, self.padding[0]), x
Exemple #2
0
 def forward(self, vec):
     ret = torch.conv_tbc(vec.contiguous(), self.weight, self.bias, pad = self.padding)
     return ret
Exemple #3
0
 def conv_tbc(self, input: Tensor):
     return torch.conv_tbc(input.contiguous(), self.weight, self.bias,
                           self.padding[0])
Exemple #4
0
 def forward(self, input):
     return torch.conv_tbc(input.contiguous(), self.weight, self.bias, self.padding[0])
Exemple #5
0
 def forward(self, input):
     return torch.conv_tbc(input.contiguous(), self.weight, self.bias,
                           self.padding[0])
 def forward(self, x: torch.Tensor) -> torch.Tensor:
     x, mean = BinActive()(x)
     return torch.conv_tbc(x.contiguous(), self.weight, self.bias,
                           self.padding[0])