本文共 613 字,大约阅读时间需要 2 分钟。
环境:运行环境:WIN10BERT版本:Bert-VITS2.4
问题描述:运行Python脚本bert_gen.py时,出现以下错误:
Unable to load weights from pytorch checkpoint file for './bert/Erlangshen-MegatronBert-1.3B-Chinese/pytorch_model.bin'.If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
此错误提示表明尝试从PyTorch模型中加载TensorFlow 2.0的检查点文件。
解决方案:
from_tf=True具体操作步骤:
from_tf=True(如从TensorFlow检查点加载)经过上述步骤后,应能够正常运行python bert_gen.py脚本。
转载地址:http://pvafk.baihongyu.com/