Closed DCSong closed 4 years ago
The error occur with code out = out * self.scale + x
, it can not correctly treat '+' or '*'.
def forward(self, x):
x0 = self.branch0(x)
x1 = self.branch1(x)
x2 = self.branch2(x)
out = torch.cat((x0, x1, x2), 1)
out = self.conv2d(out)
out = out * self.scale + x
out = self.relu(out)
return out
I have solve the error by modify out = out * self.scale
+ x to out = x + torch.mul(self.scale, out)
.
I try to convert vggface2 model to caffe from this page.
from facenet_pytorch import InceptionResnetV1
model = InceptionResnetV1(pretrained='vggface2').eval()
The code like this: `import torch from torch.autograd import Variable from torchvision.models import resnet import pytorch_to_caffe from facenet_pytorch import InceptionResnetV1
if name=='main': name='VGGFace2'
For a model pretrained on VGGFace2
And the error occurs:
When I check the paras, in self.name=self.param.name=name, the name = mul1, in self.type=self.param.type=type, the type = Eltwise, why does the error occur?
Thank you!