Comments (7)
These are the variables that caused the second error:
gimg: tensor([[[0.7569, 0.7569, 0.7569, ..., 0.6706, 0.6706, 0.6706], [0.7569, 0.7569, 0.7569, ..., 0.6706, 0.6706, 0.6706], [0.7569, 0.7569, 0.7569, ..., 0.6706, 0.6706, 0.6706], ..., [0.7961, 0.7961, 0.7961, ..., 0.7490, 0.7412, 0.7490], [0.7961, 0.7961, 0.7961, ..., 0.7490, 0.7412, 0.7490], [0.7961, 0.7961, 0.7961, ..., 0.7490, 0.7490, 0.7490]],
[[0.7569, 0.7569, 0.7569, ..., 0.6863, 0.6863, 0.6863], [0.7569, 0.7569, 0.7569, ..., 0.6863, 0.6863, 0.6863], [0.7569, 0.7569, 0.7569, ..., 0.6863, 0.6863, 0.6863], ..., [0.7961, 0.7961, 0.7961, ..., 0.7647, 0.7569, 0.7647], [0.7961, 0.7961, 0.7961, ..., 0.7647, 0.7569, 0.7647], [0.7961, 0.7961, 0.7961, ..., 0.7647, 0.7647, 0.7647]], [[0.7569, 0.7569, 0.7412, ..., 0.6784, 0.6784, 0.6784], [0.7569, 0.7569, 0.7412, ..., 0.6784, 0.6784, 0.6784], [0.7569, 0.7569, 0.7412, ..., 0.6784, 0.6784, 0.6784], ..., [0.7961, 0.7961, 0.7961, ..., 0.7569, 0.7490, 0.7569], [0.7961, 0.7961, 0.7961, ..., 0.7569, 0.7490, 0.7569], [0.7961, 0.7961, 0.7961, ..., 0.7569, 0.7569, 0.7569]]], device='cuda:0')
gimg type: <class 'torch.Tensor'> gparse: tensor([[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]], device='cuda:0', dtype=torch.uint8) gparse type: <class 'torch.Tensor'> gid[2]: 5 gid[2] type: <class 'int'>
The error is in this line: { gimgs += [gimg * (gparse == gid[2])] }
RuntimeError: expected type torch.cuda.FloatTensor but got torch.cuda.ByteTensor
Modifying gimgs += [gimg * (gparse == gid[2])]
to gimgs += [gimg * (gparse == gid[2]).to(torch.float32)]
can fix this error.
from dressing-in-order.
Maybe you can run pimg, parse, from_pose = load_img(pid, ds)
and print the size
and type
for pimg, parse, from_pose
to first check whether all the data are loaded properly?
from dressing-in-order.
pimg size: torch.Size([3, 256, 176])
pimg type<class 'torch.Tensor'>
parse size: torch.Size([256, 176])
parse type: <class 'torch.Tensor'>
from_pose size: torch.Size([18, 256, 176])
from_pose type: <class 'torch.Tensor'>
I believe the problem with the first error
{
TypeError: ne() received an invalid combination of arguments - got (NoneType), but expected one of:
(Tensor other)
didn't match because some of the arguments have invalid types: (!NoneType!)
(Number other)
didn't match because some of the arguments have invalid types: (!NoneType!)
}
is that a tensor is being compared to a None type
{
if pose != None:
}
from dressing-in-order.
These are the variables that caused the second error:
gimg: tensor([[[0.7569, 0.7569, 0.7569, ..., 0.6706, 0.6706, 0.6706],
[0.7569, 0.7569, 0.7569, ..., 0.6706, 0.6706, 0.6706],
[0.7569, 0.7569, 0.7569, ..., 0.6706, 0.6706, 0.6706],
...,
[0.7961, 0.7961, 0.7961, ..., 0.7490, 0.7412, 0.7490],
[0.7961, 0.7961, 0.7961, ..., 0.7490, 0.7412, 0.7490],
[0.7961, 0.7961, 0.7961, ..., 0.7490, 0.7490, 0.7490]],
[[0.7569, 0.7569, 0.7569, ..., 0.6863, 0.6863, 0.6863],
[0.7569, 0.7569, 0.7569, ..., 0.6863, 0.6863, 0.6863],
[0.7569, 0.7569, 0.7569, ..., 0.6863, 0.6863, 0.6863],
...,
[0.7961, 0.7961, 0.7961, ..., 0.7647, 0.7569, 0.7647],
[0.7961, 0.7961, 0.7961, ..., 0.7647, 0.7569, 0.7647],
[0.7961, 0.7961, 0.7961, ..., 0.7647, 0.7647, 0.7647]],
[[0.7569, 0.7569, 0.7412, ..., 0.6784, 0.6784, 0.6784],
[0.7569, 0.7569, 0.7412, ..., 0.6784, 0.6784, 0.6784],
[0.7569, 0.7569, 0.7412, ..., 0.6784, 0.6784, 0.6784],
...,
[0.7961, 0.7961, 0.7961, ..., 0.7569, 0.7490, 0.7569],
[0.7961, 0.7961, 0.7961, ..., 0.7569, 0.7490, 0.7569],
[0.7961, 0.7961, 0.7961, ..., 0.7569, 0.7569, 0.7569]]],
device='cuda:0')
gimg type: <class 'torch.Tensor'>
gparse: tensor([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]], device='cuda:0', dtype=torch.uint8)
gparse type: <class 'torch.Tensor'>
gid[2]: 5
gid[2] type: <class 'int'>
The error is in this line:
{
gimgs += [gimg * (gparse == gid[2])]
}
RuntimeError: expected type torch.cuda.FloatTensor but got torch.cuda.ByteTensor
from dressing-in-order.
pimg size: torch.Size([3, 256, 176]) pimg type<class 'torch.Tensor'> parse size: torch.Size([256, 176]) parse type: <class 'torch.Tensor'> from_pose size: torch.Size([18, 256, 176]) from_pose type: <class 'torch.Tensor'>
I believe the problem with the first error { TypeError: ne() received an invalid combination of arguments - got (NoneType), but expected one of:
(Tensor other) didn't match because some of the arguments have invalid types: (!NoneType!) (Number other) didn't match because some of the arguments have invalid types: (!NoneType!) } is that a tensor is being compared to a None type { if pose != None: }
This can be solved by changing if pose != None
to if type(pose) != type(None)
in the plot_image
funciton in the demo.ipynb
.
from dressing-in-order.
These are the variables that caused the second error:
gimg: tensor([[[0.7569, 0.7569, 0.7569, ..., 0.6706, 0.6706, 0.6706], [0.7569, 0.7569, 0.7569, ..., 0.6706, 0.6706, 0.6706], [0.7569, 0.7569, 0.7569, ..., 0.6706, 0.6706, 0.6706], ..., [0.7961, 0.7961, 0.7961, ..., 0.7490, 0.7412, 0.7490], [0.7961, 0.7961, 0.7961, ..., 0.7490, 0.7412, 0.7490], [0.7961, 0.7961, 0.7961, ..., 0.7490, 0.7490, 0.7490]],[[0.7569, 0.7569, 0.7569, ..., 0.6863, 0.6863, 0.6863], [0.7569, 0.7569, 0.7569, ..., 0.6863, 0.6863, 0.6863], [0.7569, 0.7569, 0.7569, ..., 0.6863, 0.6863, 0.6863], ..., [0.7961, 0.7961, 0.7961, ..., 0.7647, 0.7569, 0.7647], [0.7961, 0.7961, 0.7961, ..., 0.7647, 0.7569, 0.7647], [0.7961, 0.7961, 0.7961, ..., 0.7647, 0.7647, 0.7647]], [[0.7569, 0.7569, 0.7412, ..., 0.6784, 0.6784, 0.6784], [0.7569, 0.7569, 0.7412, ..., 0.6784, 0.6784, 0.6784], [0.7569, 0.7569, 0.7412, ..., 0.6784, 0.6784, 0.6784], ..., [0.7961, 0.7961, 0.7961, ..., 0.7569, 0.7490, 0.7569], [0.7961, 0.7961, 0.7961, ..., 0.7569, 0.7490, 0.7569], [0.7961, 0.7961, 0.7961, ..., 0.7569, 0.7569, 0.7569]]], device='cuda:0')
gimg type: <class 'torch.Tensor'> gparse: tensor([[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]], device='cuda:0', dtype=torch.uint8) gparse type: <class 'torch.Tensor'> gid[2]: 5 gid[2] type: <class 'int'>
The error is in this line: { gimgs += [gimg * (gparse == gid[2])] }
RuntimeError: expected type torch.cuda.FloatTensor but got torch.cuda.ByteTensorModifying
gimgs += [gimg * (gparse == gid[2])]
togimgs += [gimg * (gparse == gid[2]).to(torch.float32)]
can fix this error.
Thank you. I will try your solutions. I will close the issue in the mean time and reopen it if the solution doesn't work.
from dressing-in-order.
Hello,I had the same problem as you and tried the solutions above without success. Have you successfully solved it now?I really need your help, thank you!
from dressing-in-order.
Related Issues (20)
- Thcudacheck fail error and invalid argument while running the demo.py in GFLA HOT 3
- some trouble when running demo
- No such file or directory: 'pretrained_models/flownet.pt' HOT 1
- Not able to get password for img_highres.zip HOT 2
- What is $DATA_DIR in run_eval.sh file if I rerun all the training processing with DFashion dataset ? HOT 1
- Official Colab Released! HOT 4
- Results on custom images HOT 1
- High Resolution
- Typo in repo download file. HOT 1
- Help with inference. HOT 2
- Is there a specific order for the three stages of training? HOT 1
- dataset HOT 1
- NameError: name 'circle' is not defined HOT 4
- Not showing the output images while code is running HOT 1
- While trying custom images my output skeleton tilted -90 degrees HOT 3
- Google colab downloading data problem HOT 2
- multi gpu
- Step by Step to use my own clothes images HOT 3
- testM_lip not found. HOT 3
- colab Load Pretrained Model Error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dressing-in-order.