Python 加载模型权重报错 AttributeError: 'str' object has no attribute 'decode'
这个错误是因为在Python 3中,字符串默认是Unicode编码,不需要使用decode()方法。您可以尝试将代码修改为:
model.load_weights('/disk/data/workspace/009-python/lotto-master/checkpoints/model_checkpoint_1')
原文地址: https://www.cveoy.top/t/topic/mp53 著作权归作者所有。请勿转载和采集!