-
Notifications
You must be signed in to change notification settings - Fork 146
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
Error occurred when i run demo.py #35
Comments
Hello Iam also getting the same error. |
I'm so sorry that i didn't try to solve this error;
I tryed to use CPM to realize makeup transfer, maybe you can try to use it.(Although their code looks like patchwork...)
…------------------ 原始邮件 ------------------
发件人: "wtjiang98/PSGAN" ***@***.***>;
发送时间: 2022年1月22日(星期六) 晚上9:01
***@***.***>;
***@***.******@***.***>;
主题: Re: [wtjiang98/PSGAN] Error occurred when i run demo.py (Issue #35)
Hello Iam also getting the same error.
Did you resolved this issue.
If solved send me the instructions please.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hello I am also getting the same error. anybody can help me? thanks a lot |
+1 |
you can refer to #37 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Traceback (most recent call last):
File "/mnt/sdb/longwei.xu/PSGAN/demo.py", line 72, in
main()
File "/mnt/sdb/longwei.xu/PSGAN/demo.py", line 57, in main
image, face = inference.transfer(source, reference, with_face=True)
File "/mnt/sdb/longwei.xu/PSGAN/psgan/inference.py", line 33, in transfer
source_input, face, crop_face = self.preprocess(source)
File "/mnt/sdb/longwei.xu/PSGAN/psgan/preprocess.py", line 141, in call
mask = self.face_parse.parse(cv2.resize(np_image, (512, 512)))
File "/mnt/sdb/longwei.xu/PSGAN/faceutils/mask/main.py", line 37, in parse
parsing = torch.nn.functional.embedding(parsing, self.dic)
File "/mnt/sdb/longwei.xu/anaconda3/lib/python3.9/site-packages/torch/nn/functional.py", line 2044, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: 'weight' must be 2-D
parse.shape:
torch.Size([512, 512])
parse
tensor([[ 0, 0, 0, ..., 17, 17, 17],
[ 0, 0, 0, ..., 17, 17, 17],
[ 0, 0, 0, ..., 17, 17, 17],
...,
[17, 17, 17, ..., 16, 16, 16],
[17, 17, 17, ..., 16, 16, 16],
[17, 17, 17, ..., 16, 16, 16]])
The text was updated successfully, but these errors were encountered: