Beispiel #1
0
 def forward(self, input):
     from torch.legacy.nn import SpatialCrossMapLRN as SpatialCrossMapLRNOld
     self.save_for_backward(input)
     self.lrn = SpatialCrossMapLRNOld(self.size, self.alpha, self.beta,
                                      self.k)
     self.lrn.type(input.type())
     return self.lrn.forward(input)
Beispiel #2
0
 def forward(self, input):
     self.save_for_backward(input)
     if disable_torch_legacy:
         assert False
     self.lrn = SpatialCrossMapLRNOld(self.size, self.alpha, self.beta,
                                      self.k)
     self.lrn.type(input.type())
     return self.lrn.forward(input)
 def forward(self, input):
     self.save_for_backward(input)
     self.lrn = SpatialCrossMapLRNOld(self.size, self.alpha, self.beta,
                                      self.k)
     self.lrn.type(input.type())
     return self.lrn.forward(input)