Closed yyhuang01 closed 4 months ago
(fastinst) root@/FastInst# python tools/convert-timm-to-d2.py checkpoint_file/fastinst_R50-vd-dcn_ppm-fpn_x3_640_40.1.pth checkpoint_file/fastinst_R50-vd-dcn_ppm-fpn_x3_640_40.1.pkl model -> backbone.model Traceback (most recent call last): File "tools/convert-timm-to-d2.py", line 34, in newmodel[k] = obj.pop(old_k).detach().numpy() AttributeError: 'collections.OrderedDict' object has no attribute 'detach' 试图使用您的工具转换模型时出现了如上错误,我该如何解决?
是不是因为我的模型下载错了?我应该使用实例中说的那个模型去进行转换?
(fastinst) root@/FastInst# python tools/convert-timm-to-d2.py checkpoint_file/fastinst_R50-vd-dcn_ppm-fpn_x3_640_40.1.pth checkpoint_file/fastinst_R50-vd-dcn_ppm-fpn_x3_640_40.1.pkl model -> backbone.model Traceback (most recent call last): File "tools/convert-timm-to-d2.py", line 34, in
newmodel[k] = obj.pop(old_k).detach().numpy()
AttributeError: 'collections.OrderedDict' object has no attribute 'detach'
试图使用您的工具转换模型时出现了如上错误,我该如何解决?