wbhu/DnCNN-tensorflow

ValueError: could not broadcast input array from shape (9,10,1) into shape (10,10,1)

Tian14267 opened this issue · 4 comments

Excuse me. I have run your code"generate_patches.py" and I get wrong like this:
Traceback (most recent call last):
File "/home/tian/tensorflow/example/Denoising/DnCNN-tensorflow-master/generate_patches.py", line 100, in
generate_patches()
File "/home/tian/tensorflow/example/Denoising/DnCNN-tensorflow-master/generate_patches.py", line 79, in generate_patches
random.randint(0, 7))
ValueError: could not broadcast input array from shape (9,10,1) into shape (10,10,1)

I don't understand your code so I can't fix it .Can you tell me how to deal with it ?
By the way ,can you tell me the meaning or the purpose of this code?
Thank you very much!

wbhu commented

Hi @Tian14267 ,

Please make sure you have pulled the latest source code. And the function of data_augmentation() is to enlarge the dataset, including flipping and rotating, which you could find in utils.py.

Thanks

Excuse me. I still have this problem, and the code I use is lastest. I set the parameters like this :patch_size:10; stride:4; batch_size:8; num_pic:10
Please tell me how to fix this problem?
Thank you very much.

wbhu commented

Hi @Tian14267 ,

I have reproduced your error result and fixed it. You could pull the latest source code and have a try again. If there are any other problems, feel free to report it and it would be better if you fix the problems and pull request to me.

Thanks