google-research / maxim

[CVPR 2022 Oral] Official repository for "MAXIM: Multi-Axis MLP for Image Processing". SOTA for denoising, deblurring, deraining, dehazing, and enhancement.

Home Page:https://arxiv.org/abs/2201.02973

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

zhulewen1998 opened this issue · comments

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

运行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')