Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhulewen1998 opened this issue Sep 7, 2022 · 1 comment

Comments

@zhulewen1998
Copy link

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

@AKprince
Copy link

AKprince commented Jan 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants