Media-Smart / vedastr

A scene text recognition toolbox based on PyTorch
Apache License 2.0
535 stars 100 forks source link

error converting model to onnx #81

Open mrljwlm opened 3 years ago

mrljwlm commented 3 years ago

I want to convert the tps_resnet_bilstm_attn model ot onnx format, however it failed because the onnx not suport the operator grid_sampler in models/bodies/rectificators/tps_stn.py

if i skip this operator, these two errors will occured:

RuntimeError: Failed to export an ONNX attribute 'onnx::Gather', since it's not constant, please try to make things (e.g., kernel size) static if possible

RuntimeError: Unsupported: ONNX export of operator adaptive pooling, since output_size is not constant.. Please open a bug to request ONNX export support for the missing operator.

anyone can give me some help?