# ONNX export error for "RoiAlign"

**URL:** <https://discuss.pytorch.org/t/onnx-export-error-for-roialign/123177>\
**Category:** deployment\
**Created:** [June 3, 2021, 12:06pm UTC](https://discuss.pytorch.org/t/onnx-export-error-for-roialign/123177 "2021-06-03T12:06:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliver\_ss](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/oliver_ss/32/30101_2.png) [@oliver\_ss](https://discuss.pytorch.org/u/oliver_ss)\
**Post date:** [June 3, 2021, 12:06pm UTC](https://discuss.pytorch.org/t/onnx-export-error-for-roialign/123177/1 "2021-06-03T12:06:27Z")

</div>

When I try to export the “roi\_align” operator in torchvision to onnx, I meet the following error.

Do you know how to fix it? Thank you!

```auto
RuntimeError: ONNX export failed on an operator with unrecognized namespace torchvision::roi_align. If you are trying to export a custom operator, make sure you registered it with the right domain and version. Otherwise, please report a bug.

```

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [June 5, 2021, 12:13am UTC](https://discuss.pytorch.org/t/onnx-export-error-for-roialign/123177/2 "2021-06-05T00:13:48Z")

</div>

Based on the error message I guess you might need to register this custom operation as described [here](https://pytorch.org/docs/stable/onnx.html#custom-operators).
