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

import architecture as arch error #27

Open
prmex900 opened this issue Jan 16, 2019 · 6 comments
Open

import architecture as arch error #27

prmex900 opened this issue Jan 16, 2019 · 6 comments

Comments

@prmex900
Copy link

prmex900 commented Jan 16, 2019

Hi! when I run test I get this errors

Traceback (most recent call last):
File "test.py", line 7, in
import architecture as arch
File "/User/1/ESRGAN-master/architecture.py", line 33
self.model = B.sequential(fea_conv, B.ShortcutBlock(B.sequential(*rb_blocks, LR_conv)),
SyntaxError: only named arguments may follow *expression

i tried this, but didn't help
here

@xinntao
Copy link
Owner

xinntao commented Jan 17, 2019

I have not encounter this problem.
Is it from python 2. I am using python3.6/3.7

@prmex900
Copy link
Author

I have not encounter this problem.
Is it from python 2. I am using python3.6/3.7

first i was on 2.7 then i linked python 3.7. i had it installed but not linked.
i'm using mac os mojave.

@xinntao
Copy link
Owner

xinntao commented Jan 17, 2019

So when you use pytorch 3.7, still have this problem?

@prmex900
Copy link
Author

So when you use pytorch 3.7, still have this problem?

you mean python 3.7? yes, still same problem

@xinntao
Copy link
Owner

xinntao commented Jan 17, 2019

Emm, I have no idea. You need to google it or to see if anyone can help.

@cyxx
Copy link

cyxx commented Mar 16, 2020

I met the same issue today using python 2.7.
With the below diff, I have been able to run test.py -

-  self.model = B.sequential(fea_conv, B.ShortcutBlock(B.sequential(*rb_blocks, LR_conv)),\
-      *upsampler, HR_conv0, HR_conv1)
+  self.model = B.sequential(fea_conv, B.ShortcutBlock(B.sequential(*(rb_blocks + [LR_conv]))),\
+      *(upsampler + [HR_conv0, HR_conv1]))

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

3 participants