zjhuang22 / maskscoring_rcnn

Codes for paper "Mask Scoring R-CNN".
MIT License
1.9k stars 378 forks source link

environment problem #11

Open lapetite123 opened 5 years ago

lapetite123 commented 5 years ago

I followed install.md to setup environment, in the last step to install PyTorch maskscoring_rcnn, I got some error like this: /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:15:17: error: switch quantity not an integer switch (TYPE) { \ ^ /home//github/maskscoring_rcnn/maskrcnn_benchmark/csrc/cpu/nms_cpu.cpp:71:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’ AT_DISPATCH_FLOATING_TYPES(dets.type(), "nms", [&] { ^ /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:16:44: error: could not convert ‘Double’ from ‘c10::ScalarType’ to ‘’ AT_PRIVATE_CASE_TYPE(at::ScalarType::Double, double, VA_ARGS) \ ^ /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:8:8: note: in definition of macro ‘AT_PRIVATE_CASE_TYPE’ case enum_type: { \ ^ /home/github/maskscoring_rcnn/maskrcnn_benchmark/csrc/cpu/nms_cpu.cpp:71:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’ AT_DISPATCH_FLOATING_TYPES(dets.type(), "nms", [&] { ^ /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:17:44: error: could not convert ‘Float’ from ‘c10::ScalarType’ to ‘’ AT_PRIVATE_CASE_TYPE(at::ScalarType::Float, float, VA_ARGS) \ ^ /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/ATen/Dispatch.h:8:8: note: in definition of macro ‘AT_PRIVATE_CASE_TYPE’ case enum_type: { \ ^ /home/github/maskscoring_rcnn/maskrcnn_benchmark/csrc/cpu/nms_cpu.cpp:71:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’ AT_DISPATCH_FLOATING_TYPES(dets.type(), "nms", [&] {

In file included from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/c10/core/Scalar.h:10:0, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/ATen/core/Type.h:8, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/ATen/Type.h:2, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/ATen/Context.h:4, from /hom/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/torch/extension.h:4, from /home/github/maskscoring_rcnn/maskrcnn_benchmark/csrc/cpu/vision.h:3, from /home/github/maskscoring_rcnn/maskrcnn_benchmark/csrc/cpu/nms_cpu.cpp:2: /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/c10/core/ScalarType.h:122:28: note: ‘c10::toString’ static inline const char * toString(ScalarType t) { ^ /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/c10/core/ScalarType.h:122:28: note: ‘c10::toString’ /home/miniconda3/envs/maskrcnn_benchmark/lib/python3.7/site-packages/torch/include/c10/core/ScalarType.h:122:28: note: ‘c10::toString’ error: command 'gcc' failed with exit status 1 can you please help me?

JisongXie commented 5 years ago

I get the same error. It seems that it's the problem of pytorch, because the error emerge from the header file of "/torch/include/". I haven't solve it.

iamwangyabin commented 5 years ago

it is pytorch problem ,i suggest you use docker,it will save you time

lapetite123 commented 5 years ago

I get the same error. It seems that it's the problem of pytorch, because the error emerge from the header file of "/torch/include/". I haven't solve it.

if you have solved this problem ,please kindly let me know how to solve it. thanks

lapetite123 commented 5 years ago

it is pytorch problem ,i suggest you use docker,it will save you time

can you please tell me how to use docker to setup environment, cause I am a new docker user

TyroneLi commented 5 years ago

Luckily,I solve this issue by installing the stable pytorch(just follow the official introduction to install stable pytorch),as the author introduced to install the previewer pytorch version,and that should be the potential bug for gcc 5.4.0.Maybe this could be attacked in the next stable pytorch version.

zhuliqian commented 5 years ago

thank you very much @TyroneLi