ruotianluo/ImageCaptioning.pytorch

missing the module or attribute `_C` in the maskrcnn_benchmark package your calling in your notebook

antoinecomp opened this issue · 0 comments

I tried to run your notebook and it seems the maskrcnn_benchmark package is missing the module or attribute _C.

[/content/vqa-maskrcnn-benchmark/maskrcnn_benchmark/layers/nms.py](https://localhost:8080/#) in <module>
      1 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
      2 # from ._utils import _C
----> 3 from maskrcnn_benchmark import _C
      4 
      5 nms = _C.nms

ImportError: cannot import name '_C' from 'maskrcnn_benchmark' (/content/vqa-maskrcnn-benchmark/maskrcnn_benchmark/__init__.py)

I went through the source code of this package to make sure that _C is well defined, you can check on the gitlab repo here) and got:

config	data	__init__.py  modeling	  solver      utils
csrc	engine	layers	     __pycache__  structures

So we don't have _C. Here is the file that calls it, nms.py:

# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# from ._utils import _C
from maskrcnn_benchmark import _C

nms = _C.nms
# nms.__doc__ = """
# This function performs Non-maximum suppresion"""