soap117 / DeepRule

BSD 3-Clause "New" or "Revised" License
125 stars 42 forks source link

error: could not convert ‘at::CUDA(((c10::ScalarType)c10::kFloat))’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef’ {aka ‘c10::ArrayRef<long int>’} 44 | auto max_val = at::zeros(torch::CUDA(at::kFloat), {batch, channel, width}); #18

Open calendar3450 opened 2 years ago

calendar3450 commented 2 years ago

HI I read your paper and interesting about your chartOCR. But I have a error. error: could not convert ‘at::CUDA(((c10::ScalarType)c10::kFloat))’ from ‘at::DeprecatedTypeProperties’ to ‘c10::IntArrayRef’ {aka ‘c10::ArrayRef’} 44 | auto max_val = at::zeros(torch::CUDA(at::kFloat), {batch, channel, width}); I read read me and git clone CornerNet but I dont know about this error I install cuda and install all package

MakowToms commented 2 years ago

In all the places you have to change order of at::zeros arguments. For example, change at::zeros(torch::CUDA(at::kFloat), {batch, channel, width}); into at::zeros({batch, channel, width}, torch::CUDA(at::kFloat));

calendar3450 commented 2 years ago

In all the places you have to change order of at::zeros arguments. For example, change at::zeros(torch::CUDA(at::kFloat), {batch, channel, width}); into at::zeros({batch, channel, width}, torch::CUDA(at::kFloat));

Thx!! You save my life!!