question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash while forwarding model in test_frcnn_tracing from vision/test/tracing/frcnn

See original GitHub issue

Hi, I have some problem forwarding the fasterrcnn_resnet50_fpn.pt in test_frcnn_tracing. I had some problem loading the model, i solved it by adding those lines:

#include <torchvision/empty_tensor_op.h>

static auto registry =
        torch::RegisterOperators().op("torchvision::roi_align(Tensor input, Tensor rois, float spatial_scale, int "
                                      "pooled_height, int pooled_width, int sampling_ratio, bool aligned) -> Tensor",
                                      &roi_align)
                                      .op("torchvision::nms", &nms)
                                      .op("torchvision::_new_empty_tensor_op", &new_empty_tensor);

after solving this problem i’m encountering a segmentation fault in the forward function. its looking like the segmentation fault is coming from torchvision/nms.h in this call:

return op.call(dets, scores, iou_threshold);

my torchvision is compiled from source in branch v0.8.2 my libtorch is also compiled from source in branch v1.7.1

To compile the frcnn model i’m using python 3.6.8 with pytorch 1.7.1 and torchvision 0.8.2

Can you please help me understand what is the problem here? Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
natangold85commented, Feb 25, 2021

Wanted to update that i found the problem in libtorch. So i’m using current master for libtorch and torchvision and i’m able to use torchvision operators on jit.

Thanks !

1reaction
natangold85commented, Feb 16, 2021

Will update. I have some non-related tasks and will get back to it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found