microsoft / unilm

Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities
https://aka.ms/GeneralAI
MIT License
19.11k stars 2.44k forks source link

Torch.nn.bilinear can not export to onnx #774

Open githublsk opened 2 years ago

githublsk commented 2 years ago

Hi developer, When I export layoutxlm RE model to onnx, I find torch.nn.bilinear can not export to onnx, can a function that can be supported by onnx replace torch.nn.bilinear? image

gjj123 commented 1 year ago

@githublsk hello, bilinear layer can be rewirte as a new class, i have another question, when converting layoutlmv2 RE model to onnx , the input 'entities','relations' are dict type, how to convert to onnx?

syanng commented 10 months ago

@gjj123 Could you help me know how to write bilinear to a new class

gjj123 commented 10 months ago

@syanng https://blog.csdn.net/gjj19901005/article/details/127530571?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169408710616800188532010%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=169408710616800188532010&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-1-127530571-null-null.142^v93^chatgptT3_2&utm_term=layoutlmv2%20onnx&spm=1018.2226.3001.4187