-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Method AffineChannel is not a registered operator #454
Comments
I used the With the
With the
Does this mean the Detectron operators are actually not compiled? If so, what could possibly be the reason and how can I make them compile? |
@ir413 Thanks for your reply. I have managed to build Caffe2 and obtain the (probably incorrect) What are the extra modifications that may be needed for building on Windows? If it is not that complex, I may give it a shot myself. Would you be so kind to give me some hints? |
I don't have any experience with using Caffe2 on Windows so I don't really have a very clear idea of what may be required. I suspect that if you can get Caffe2 to work on Windows then it should be possible to run Detectron as well but I may be missing something. Just to double-check, you verified your Caffe2 installation by running Caffe2 tests (e.g. this one), right?
It seems that the problem has to do with loading detectron operators. Detectron ops are built as a Caffe2 module (located here) and loaded dynamically from python (by this function). I guess, the issue may have do with (1) building Detectron ops or (2) loading them (or both). For (1), I would look into this CMake file and check if Windows specific modifications are required. For (2), I would look into this function and make sure that it is handling Windows libraries correctly. |
@ir413 I have just tried
All test cases fail with the invalid device function Error. Could it possibly be that my GPU-enabled Caffe2 is built for the wrong architecture? The GPU I used is a GTX 1050, and I found its architecture is Pascal from the NVIDIA website. In the I do not know if this may lead to failure of loading Detectron operators. I will let you know as soon as the building is completed. |
@ir413 The FYI, the cmake command for my Caffe2 building is as follows. The
|
Thanks for the updates @II-Matto. You can also use |
@ir413 For (2), I think the code for loading For (1), currently I do not feel there should be anything special on Windows. But as I am not that familiar with CMake, I am not sure about this. I have been reading I notice that Caffe2 is built as static library by default on Windows with |
Thanks for the info @II-Matto. I'm not sure about this and I suggest asking on the PyTorch/Caffe2 page. In the meantime to get unblocked, you could try moving the ops from the Detectron module to the standard Caffe2 operators to avoid building them separately and loading them dynamically. |
@ir413 Thanks for the advice. I guess this may be the optimal solution for me right now. |
Succeed in building detectron on [Win10 ,python36 , vs2015 cuda8.0, cudnn7.0.5 ]by the adivice from this discussion in this issues. Mean procedure:
|
Expected results
I am trying to run Detectron in Windows. After successfully building caffe2 (with CUDA, cuDNN, OpenCV), COCOAPI and Detectron modules, I ran the
tools/train_net.py
, trying to train a network on Pascal VOC.I have modified
import_detectron_ops()
indetectron/utils/c2.py
to use mycaffe2_detectron_ops_gpu.dll
path.I have added the following path with
sys.path.insert(0, path)
(intools/train_net.py
).I have added the following path to my
PATH
variable.pytorch/build/bin/Release
), which containscaffe2_detectron_ops_gpu.dll
With all these prepared, I was hoping I could successfully train Faster R-CNN using Detectron.
Actual results
It seems to have succeeded in all
import
commands. But it then results in the following error:I have checked out issue #320, and ensured that there is
c2_utils.import_detectron_ops()
, which should have imported the Detectron operators.Detailed steps to reproduce
tools/train_net.py
with proper arguments.System information
PYTHONPATH
environment variable: (sys.path.insert()
is used instead as described above)python --version
output: Python 2.7.12 :: Anaconda custom (64-bit)The text was updated successfully, but these errors were encountered: