Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input and weights data type mismatch #42

Open
sanreddy6492 opened this issue Jul 20, 2023 · 0 comments
Open

Input and weights data type mismatch #42

sanreddy6492 opened this issue Jul 20, 2023 · 0 comments

Comments

@sanreddy6492
Copy link

sanreddy6492 commented Jul 20, 2023

ERROR: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor

INPUT data:

{'image': tensor([[[[104, 104, 109,  ...,  26,  26,  26],
          [104, 104, 110,  ...,  26,  26,  26],
          [104, 105, 110,  ...,  26,  26,  26],
          ...,
          [198, 199, 198,  ..., 172, 175, 177],
          [197, 197, 198,  ..., 173, 176, 177],
          [197, 197, 197,  ..., 175, 177, 177]],

         [[111, 110, 114,  ...,  30,  30,  30],
          [111, 111, 115,  ...,  30,  30,  30],
          [112, 112, 115,  ...,  30,  30,  30],
          ...,
          [163, 164, 163,  ..., 146, 149, 151],
          [162, 162, 163,  ..., 147, 150, 151],
          [162, 162, 162,  ..., 149, 151, 151]],

         [[ 80,  79,  83,  ...,  41,  41,  41],
          [ 80,  80,  84,  ...,  41,  41,  41],
          [ 81,  81,  84,  ...,  41,  41,  41],
          ...,
          [135, 136, 135,  ..., 131, 134, 136],
          [134, 134, 135,  ..., 132, 135, 136],
          [134, 134, 134,  ..., 134, 136, 136]]]], device='cuda:0',
       dtype=torch.uint8), 'image_mean': tensor([[0.3452, 0.3205, 0.2841]], device='cuda:0', dtype=torch.float64), 'image_std': tensor([[0.1883, 0.1543, 0.1420]], device='cuda:0', dtype=torch.float64)}
       
       
       I have tried multiple things like .to('cuda:0') , .to_gpu() etc, nothing worked.
       
       
       CAN SOMEONE PLEASE HELP ME RESOLVE THIS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant