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

help #51

Open
hiliusong opened this issue Dec 1, 2019 · 2 comments
Open

help #51

hiliusong opened this issue Dec 1, 2019 · 2 comments

Comments

@hiliusong
Copy link

hiliusong commented Dec 1, 2019

I run the main.py,but there are still some errors even some error is to random.py. why?I am a littlewhite,Wish some good people could help me,3x!

(base) C:\Users\liu\Downloads\DnCNN-tensorflow-master>python model.py

(base) C:\Users\liu\Downloads\DnCNN-tensorflow-master>python main.py
GPU

Traceback (most recent call last):
File "main.py", line 88, in
tf.app.run()
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "main.py", line 60, in main
model = denoiser(sess)
File "C:\Users\liu\Downloads\DnCNN-tensorflow-master\model.py", line 39, in init
self.dataset = dataset(sess)
File "C:\Users\liu\Downloads\DnCNN-tensorflow-master\model.py", line 202, in init
random.shuffle(ind)
File "C:\ProgramData\Anaconda3\lib\random.py", line 274, in shuffle
x[i], x[j] = x[j], x[i]
TypeError: 'range' object does not support item assignment

@RavenKang
Copy link

You are using python3. In python3 'range' object does not a list.
You should change ind = range(len(filepaths)) to ind = list(range(len(filepaths)))

@hiliusong
Copy link
Author

hiliusong commented Dec 28, 2019 via email

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

2 participants