warmspringwinds / pytorch-cpp

Pytorch C++ Library
369 stars 68 forks source link

div operation occur error #23

Open zlbing opened 6 years ago

zlbing commented 6 years ago

I have a tensor A shape [1,256,15,20] and B shape [1,1,15,20], when I use A.div(B), it error. the error is terminate called after throwing an instance of 'std::runtime_error' what(): invalid argument 3: sizes do not match at /home/zzz/work-space/pytorch-cpp/ATen/lib/THC/generated/../generic/THCTensorMathPointwise.cu:345

for Example Tensor A = CPU(kFloat).randn({1,10,5,5}); Tensor B = CPU(kFloat).randn({1,1,5,5}); A = A.div(B);