RepVGG icon indicating copy to clipboard operation
RepVGG copied to clipboard

fix data type debug

Open chenjun2hao opened this issue 4 years ago • 1 comments

fix batchnorm data type debug

chenjun2hao avatar Jan 13 '21 10:01 chenjun2hao

I understand the np.float32 part, thanks for the suggestion, but why is the cuda part deleted? That causes a gpu-cpu mismatch during inference or training (RuntimeError: expected device cpu but got device cuda:0) when you get the equivalent kernel for some reason. id_tensor should be on the same device. The latest version (self.id_tensor = torch.from_numpy(kernel_value).to(branch.weight.device)) looks good and works fine.

DingXiaoH avatar Jan 13 '21 10:01 DingXiaoH