MinkowskiEngine icon indicating copy to clipboard operation
MinkowskiEngine copied to clipboard

Mixed precision (16-bit) training error

Open asadabbas09 opened this issue 3 years ago • 7 comments

I'm trying to use 16 bit precision in pytorch lightning to save some gpu memory, but I'm getting this error:

RuntimeError:MinkowskiEngine/src/convolution_gpu.cu:69, assertion (in_feat.scalar_type() == kernel.scalar_type()) failed. type mismatch

Is there a way to fix this error?

asadabbas09 avatar Aug 23 '21 07:08 asadabbas09

same problem..

jh-chung1 avatar Mar 23 '22 20:03 jh-chung1

I also get that error and i dont understand, how im supposed to influence the data type of the kernel, as im using standard ME convs

EDIT: I fixed the problem by adjusting dtypes in the creation of my sparse tensors. dtype=torch.int16 did it for me

Ltwicke avatar Mar 30 '22 12:03 Ltwicke

same problem

houyongkuo avatar Apr 04 '22 09:04 houyongkuo

I carefully compared my input with the input of FCGF, Minkowskiengine/example/reconstruction.py&completion.py, and found that the dtype in my input is different from the others, mine is float64, the others are float32, guess this should be the reason error caused by

houyongkuo avatar Apr 06 '22 03:04 houyongkuo

Hi all, I met this problem too, I found it occurs after removing nn.Sequential in my code.

work well: self.module = nn.Sequential(ME.MinkowskiConvolution(3, 128, 3, dimension=3))

error: self.module = ME.MinkowskiConvolution(3, 128, 3, dimension=3)

luoao-kddi avatar Sep 19 '23 05:09 luoao-kddi

same problem, you have to make sure the tensor type of features is torch.float32.

ZiliangMiao avatar Mar 02 '24 16:03 ZiliangMiao