google-research / maxim

[CVPR 2022 Oral] Official repository for "MAXIM: Multi-Axis MLP for Image Processing". SOTA for denoising, deblurring, deraining, dehazing, and enhancement.
https://arxiv.org/abs/2201.02973
Apache License 2.0
977 stars 105 forks source link

运行run_eval.py文件之后,出现了这个错误,UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 50: invalid continuation byte,请问怎么解决? #23

Open zhulewen1998 opened 1 year ago

zhulewen1998 commented 1 year ago

运行run_eval.py文件之后,出现了这个错误,UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 50: invalid continuation byte,请问怎么解决?

AKprince commented 1 year ago

运行run_eval.py文件之后,出现了这个错误,UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 50: invalid continuation byte,请问怎么解决?

这个可能是GFile读取的问题,我的解决方法是将
with tf.io.gfile.GFile(ckpt_path, 'rb') as f: data = f.read() 这两行删掉,直接用np.load()加载checkpoint.npz文件 即,values = np.load('checkpoint.npz')