WaveletSRNet icon indicating copy to clipboard operation
WaveletSRNet copied to clipboard

Can't load model "wavelet_weights_c2.pkl"

Open ayst123 opened this issue 6 years ago • 9 comments

Hi,

It seems the uploaded model doesn't work. is it possible to update it? Thanks!

image

ayst123 avatar Mar 08 '18 23:03 ayst123

Please use pickle to load the parameters stored in the pkl file, following the lines 43-49 in networks.py.

import pickle
f = file('wavelet_weights_c2.pkl','rb')
dct = pickle.load(f) 
 f.close()

hhb072 avatar Mar 09 '18 01:03 hhb072

Thanks for the reply. But I am still confused. The pkl file is only for WaveletTransform? How to load parameters for the NetSR(). I am not sure what should we give for "--pretrained".

Is it possible to have the detailed instruction on how to test image using the existing parameters ? Thanks

ayst123 avatar Mar 09 '18 01:03 ayst123

Can I ask where is the pretrained model for srnet? It seems that pkl file is for the module, WaveletTransform, but not srnet. Thanks

image

ayst123 avatar Mar 09 '18 06:03 ayst123

I have the same question with the variable pretrained.

ineslyl avatar May 02 '18 02:05 ineslyl

The pkl file can not be loaded using the method presented in the second floor. The error is like that: Traceback (most recent call last): File "test_tmp.py", line 4, in model = pickle.load(file) UnicodeDecodeError: 'ascii' codec can't decode byte 0xbf in position 23: ordinal not in range(128)

Do you know what's wrong with it?

unlabeledData avatar May 09 '18 03:05 unlabeledData

@unlabeledData pickle.load(file, encoding='latin1')

TuXiaokang avatar Dec 18 '18 05:12 TuXiaokang

how to load WaveletTransform's weights when upscale factor == 8? @hhb072

TuXiaokang avatar Dec 18 '18 05:12 TuXiaokang

wavelet_weights_c2.pkl
where can i get this weights ????

hongdd avatar Apr 10 '19 04:04 hongdd

@TuXiaokang Thank you, it works when I add (encoding='latin1')

ChriswooTalent avatar Oct 17 '19 11:10 ChriswooTalent