训练模型时出现以下报错:
AttributeError: ‘bytes’ object has no attribute ‘encode’
解决方法:点击报错进入对应的报错文档,把encode改成decode就可以了。
这是因为在python3中,编码的时候区分了字符串和二进制
参考:https://www.jianshu.com/p/a4cf632d97f1
python报错 AttributeError: ‘bytes’ object has no attribute ‘encode’
最新推荐文章于 2024-03-21 09:56:32 发布