Closed xinlin-xiao closed 11 months ago
hi@xinlin-xiao I have encountered a similar problem recently, but I think it is an error in the xformer module. You can try setting the xatten used in backbone vit to False.
@deyiluobo hi,thanks,i use https://facebookresearch.github.io/xformers/components/ops.html Equivalent pytorch code instead x = xops.memory_efficient_attention(q, k, v)
.it can solve the problem.
Have you met this import error?
你遇到过这个导入错误吗?
maybe you can not use "Caffe2Tracer",you should not import it
转模型时好像需要导入呀
发自我的iPhone
------------------ Original ------------------ From: xinlin-xiao @.> Date: Wed,Dec 20,2023 8:21 PM To: baaivision/EVA @.> Cc: woshidengweimo @.>, Comment @.> Subject: Re: [baaivision/EVA] use torch.jit.trace export pytorch 2 torchscript fail. (Issue #131)
你看看转onnx和torchscript不需要你那个包 ,转其它的应该啥环境你没装,搜一下装一下环境就可以
---Original--- From: @.> Date: Wed, Dec 20, 2023 20:24 PM To: @.>; Cc: @.>;"State @.>; Subject: Re: [baaivision/EVA] use torch.jit.trace export pytorch 2 torchscript fail. (Issue #131)
转模型时好像需要导入呀
发自我的iPhone
------------------ Original ------------------ From: xinlin-xiao @.> Date: Wed,Dec 20,2023 8:21 PM To: baaivision/EVA @.> Cc: woshidengweimo @.>, Comment @.> Subject: Re: [baaivision/EVA] use torch.jit.trace export pytorch 2 torchscript fail. (Issue #131) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
我用“tracing”,而不是“caffe2_tracing”。转成功了onnx。后面你有做onnx到trt吗?
你是得看用的哪个模型,onnx转trt可能有些算子trt不支持
---Original--- From: @.> Date: Thu, Dec 21, 2023 11:58 AM To: @.>; Cc: @.>;"State @.>; Subject: Re: [baaivision/EVA] use torch.jit.trace export pytorch 2 torchscript fail. (Issue #131)
我用“tracing”,而不是“caffe2_tracing”。转成功了onnx。后面你有做onnx到trt吗?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
I rewrite EVA/EVA-master-project/EVA-02/det/tools/deploy/export_model.py to use LazyConfig to read EVA/EVA-master-project/EVA-02/det/projects/ViTDet/configs/eva2_o365_to_coco/eva2_o365_to_coco_cascade_mask_rcnn_vitdet_l_8attn_1536_lrd0p8.py
The export_model.py after change:
The eva2_o365_to_coco/eva2_o365_to_coco_cascade_mask_rcnn_vitdet_l_8attn_1536_lrd0p8.py is:
And,I use the :
./export_model.py--config-file /mnt/data1/download_new/EVA/EVA-master-project/EVA-02/det/projects/ViTDet/configs/eva2_o365_to_coco/eva2_o365_to_coco_cascade_mask_rcnn_vitdet_l_8attn_1536_lrd0p8.py --output ./output --export-method tracing --format torchscript
to export pytorch 2 torchscript.
It return a erros:
I would be very grateful if you could give me some suggestion to fix it !