Misaliet / Seamless-Satellite-image-Synthesis

code for paper -- "Seamless Satellite-image Synthesis"
GNU General Public License v2.0
16 stars 4 forks source link

Tensor for argument #2 'mat1' is on CPU, but expected it to be on GPU (while checking arguments for addmm) #1

Closed superran1 closed 2 years ago

superran1 commented 2 years ago

When I use Django and want to be able to display it on the web. I got the following error, I am a novice, I don't know which file is wrong, can you help me? image

superran1 commented 2 years ago

When I use Django and want to be able to display it on the web. I got the following error, I am a novice, I don't know which file is wrong, can you help me? image

The type of the tensor z_sample in view.py is CPU, and the tensor must be changed to GPU z_sample= z_sample.cuda()

Misaliet commented 2 years ago

Sorry I just saw your message. This is indeed my negligence. I will fix this today. Because of covid-19, I could not go to my office and use my office desktop which includes a GPU in the past few months, so I test these codes by my own laptop at the last time. There may be other bugs in this code. If you encounter other problems, you can continue to submit issues.