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.

could not convert ‘Double’ from ‘c10::ScalarType’ to ‘<type error>’ AT_PRIVATE_CASE_TYPE(at::ScalarType::Double, double, __VA_ARGS__)

See original GitHub issue

Getting few errors while building latest from source;

======================================= site-packages/torch/include/ATen/Dispatch.h:15:17:`` error: switch quantity not an integer switch (TYPE) { \ ^ /maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp:242:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’ AT_DISPATCH_FLOATING_TYPES(input.type(), “ROIAlign_forward”, [&] { ^~~~~~~~~~~~~~~~~~~~~~~~~~ /python3.7/site-packages/torch/include/ATen/Dispatch.h:16:44: error: could not convert ‘Double’ from ‘c10::ScalarType’ to ‘<type error>’ AT_PRIVATE_CASE_TYPE(at::ScalarType::Double, double, VA_ARGS) \ ^ /python3.7/site-packages/torch/include/ATen/Dispatch.h:8:8: note: in definition of macro ‘AT_PRIVATE_CASE_TYPE’ case enum_type: { \ ^~~~~~~~~ /maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp:242:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’ AT_DISPATCH_FLOATING_TYPES(input.type(), “ROIAlign_forward”, [&] { ^~~~~~~~~~~~~~~~~~~~~~~~~~ /python3.7/site-packages/torch/include/ATen/Dispatch.h:17:44: error: could not convert ‘Float’ from ‘c10::ScalarType’ to ‘<type error>’ AT_PRIVATE_CASE_TYPE(at::ScalarType::Float, float, VA_ARGS) \ ^ /python3.7/site-packages/torch/include/ATen/Dispatch.h:8:8: note: in definition of macro ‘AT_PRIVATE_CASE_TYPE’ case enum_type: { \ ^~~~~~~~~ /maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp:242:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’ AT_DISPATCH_FLOATING_TYPES(input.type(), “ROIAlign_forward”, [&] { ^~~~~~~~~~~~~~~~~~~~~~~~~~ /python3.7/site-packages/torch/include/c10/core/Device.h:5:0, from /python3.7/site-packages/torch/include/c10/core/Allocator.h:6, from/python3.7/site-packages/torch/include/ATen/ATen.h:3, from /python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from python3.7/site-packages/torch/include/torch/script.h:3, from /maskrcnn_benchmark/csrc/cpu/vision.h:3, from /maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp:2: /python3.7/site-packages/torch/include/ATen/Dispatch.h:19:51: error: ‘toString’ was not declared in this scope AT_ERROR(#NAME, " not implemented for ‘", toString(TYPE), "’“); \ ^ /python3.7/site-packages/torch/include/c10/util/Exception.h:134:88: note: in definition of macro ‘AT_ERROR’ throw ::c10::Error({func, FILE, static_cast<uint32_t>(LINE)}, ::c10::str(VA_ARGS)) ^~~~~~~~~~~ /maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp:242:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’ AT_DISPATCH_FLOATING_TYPES(input.type(), “ROIAlign_forward”, [&] { ^~~~~~~~~~~~~~~~~~~~~~~~~~ /python3.7/site-packages/torch/include/ATen/Dispatch.h:19:51: note: suggested alternatives: AT_ERROR(#NAME, " not implemented for '”, toString(TYPE), “'”); \ ^ /python3.7/site-packages/torch/include/c10/util/Exception.h:134:88: note: in definition of macro ‘AT_ERROR’ throw ::c10::Error({func, FILE, static_cast<uint32_t>(LINE)}, ::c10::str(VA_ARGS)) ^~~~~~~~~~~ /maskrcnn_benchmark/csrc/cpu/ROIAlign_cpu.cpp:242:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’ AT_DISPATCH_FLOATING_TYPES(input.type(), “ROIAlign_forward”, [&] { ^~~~~~~~~~~~~~~~~~~~~~~~~~

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
fmassacommented, Mar 13, 2019

Yes, now we need to use PyTorch master if we use last maskrcnn-benchmark

1reaction
sniklauscommented, Mar 13, 2019

I see what’s going on, I have not been using PyTorch nightly but 1.0.1 instead. Using the following commit seems to work even without nightly: git checkout 90080e60cc4a9252d019f475af044c9d4119b09b

Read more comments on GitHub >

github_iconTop Results From Across the Web

why does error cannot convert 'double*' to double show up in ...
The function returns 'results_arr' which is a 'double[]' but the return type is 'double'. If you want to return results_arr you want to...
Read more >
Cannot convert value of type '[Dou… | Apple Developer Forums
I can't fix this error. Cannot convert value of type '[Double]' to expected argument type 'Double' let someValue = Double(SomeValue / SomeValue) ...
Read more >
Cant convert double[] to double[*] in LV2013(64bit) built VI ...
Solved: Hi, having a problem passing double arrays to . ... yells at me with an error "cannot convert from 'double[]' to 'double[*]'...
Read more >
I am getting an error "cannot convert double value to a handle".
I am getting an error "cannot convert double value to a handle". ... joshua thompson on 23 May 2017 ... Text = 'Times...
Read more >
Cannot convert '#value!" to double - qgis - GIS Stack Exchange
There are values in the field that can't be converted to a double (a string with letters, wrong decimal separator etc).
Read more >

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