PyTorch Runtime Error: input type (double) and bias type (float) should be the same

boingboing·2023년 8월 3일
0
  • 학습을 할 때 Input Type(double)과 Weight Type(float-32bit)이 달라서 발생하는 문제

  • numpy default형은 float(float64-double)임

  • 학습은 float32로 되고 내가 생성한 Input(representation Map은 Numpy의 기본 float형 - float64)라서 임.

  • Default float in Numpy is float64

  • you must convert the Numpy tensor to np.float32 before converting it to Pytorch.

0개의 댓글