Open zhilaAI opened 4 years ago
Can you please help me?
Are you running the following command? python ./predict.py -dataroot ./testImg -predictpath ./p -batch_size 3
If so, do you modify predict.py
?
I can't reproduce your issue so I would need more detail.
Hi, Yes I used the same command line to run the program.
I did not change anything in predict.py. I do not know why I have this error.
I followed your instructions step by step to run. The only issue here I did not use TensorFlow 1.6, I am using 1.14. But I do not think this is the problem.
On Mon, Sep 28, 2020 at 3:29 AM cctakaet notifications@github.com wrote:
Are you running the following command? python ./predict.py -dataroot ./testImg -predictpath ./p -batch_size 3
If so, do you modify predict.py ? I can't reproduce your issue so I would need more detail.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/weitingchen83/JSTASR-DesnowNet-ECCV-2020/issues/1#issuecomment-699923014, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKCQ2IK3QBJWVFY2W7XLF5TSIBQRPANCNFSM4RP4FUBA .
-- Yours sincerely, Zhila
UBC University, Okanagan Campus Faculty of Applied Science EME4242 - 1137 Alumni Ave Kelowna, BC Canada V1V 1V7 Ph.D. Student Tel. |+15149926299 Alternative Emails: http://goog_284045116zhilaai@mail.ubc.ca, zhila.bahrami@ http://@canscantech.comcanscantech.com
It seems to be an issue of keras/tf. https://github.com/keras-team/keras/issues/13279
Could you try TensorFlow 1.12.0 ? We actually use this verion for training and testing.
If you want to use docker, we already have docker image on docker hub.
You can get it by docker pull cctakaet/jstasr:latest
.
I think you are right the problem is with libraries and packages. I tried TensorFlow 1.12 to run the code. I could not install TensorFlow 1.12.0 as my Cuda is not matched with that version. My Cuda is 10.1. I will focus on using the docker container to see if I can run the model successfully or not. I am so grateful for your help.
On Mon, Sep 28, 2020 at 11:19 AM cctakaet notifications@github.com wrote:
It seems to be an issue of keras/tf. keras-team/keras#13279 https://github.com/keras-team/keras/issues/13279
Could you try TensorFlow 1.12.0 ? We actually use this verion for training and testing. If you want to use docker, we already have docker image on docker hub. You can get it by docker pull cctakaet/jstasr:latest .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/weitingchen83/JSTASR-DesnowNet-ECCV-2020/issues/1#issuecomment-700201629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKCQ2IJZFOHFCPBSPA2PJCTSIDHU5ANCNFSM4RP4FUBA .
-- Yours sincerely, Zhila
UBC University, Okanagan Campus Faculty of Applied Science EME4242 - 1137 Alumni Ave Kelowna, BC Canada V1V 1V7 Ph.D. Student Tel. |+15149926299 Alternative Emails: http://goog_284045116zhilaai@mail.ubc.ca, zhila.bahrami@ http://@canscantech.comcanscantech.com
File "./predict.py", line 95, in
modelRecoverCombine = model.model.build_combine_model()
File "/home/zhila/Project/Research_Journal/JSTASR-DesnowNet-ECCV-2020/model/model.py", line 192, in build_combine_model
modelSnow.load_weights('./modelParam/snowmodel.h5',by_name=False)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 492, in load_wrapper
return load_function(*args, *kwargs)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/network.py", line 1230, in load_weights
f, self.layers, reshape=reshape)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 1224, in load_weights_from_hdf5_group
reshape=reshape)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 861, in preprocess_weights_for_loading
weights = convert_nested_model(weights)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 836, in convert_nested_model
original_backend=original_backend))
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 980, in preprocess_weights_for_loading
weights[0] = np.transpose(weights[0], (3, 2, 0, 1))
File "<__array_function__ internals>", line 6, in transpose
File "/home/zhila/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 653, in transpose
return _wrapfunc(a, 'transpose', axes)
File "/home/zhila/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc
return bound(args, **kwds)
ValueError: axes don't match array