Tensor Type Error when Using Robust DPatch #1947
Unanswered
dominic-simon
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am getting the following error when trying to generate the Robust DPatch:
RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same
The image data type and model data type are not the same. I pass the image as a numpy array to the generation function, so I have no access to the image as a torch tensor. I tried forcing the model to use the DoubleTensor type, but it doesn't seem to work.
I have the normal DPatch working, but I would prefer to use the Robust DPatch. I'm not sure where I'm going wrong, so any help is appreciated. Let know if I need to provide any additional information. Here is my code for reference:
Beta Was this translation helpful? Give feedback.
All reactions