xxradon / PytorchToCaffe

Pytorch model to caffe model, supported pytorch 0.3, 0.3.1, 0.4, 0.4.1 ,1.0 , 1.0.1 , 1.2 ,1.3 .notice that only pytorch 1.1 have some bugs
MIT License
783 stars 224 forks source link

torch.tanh can't convert but F.tanh can, why? What should I do to support it. #106

Open JasonDu1993 opened 3 years ago

JasonDu1993 commented 3 years ago

pytorch 1.2.0

HaolyShiit commented 3 years ago

add: torch.tanh = Rp(torch.tanh,_tanh)

HaolyShiit commented 3 years ago

在文件 pytorch_to_caffe.py 中, 仿照 :F.tanh = Rp(F.tanh,_tanh) 添加 :torch.tanh = Rp(torch.tanh,_tanh) 试试看。