Open BrightHai opened 4 years ago
同问 我这边使用的albert_base的预训练模型,同样在结果中出错,报错信息 Shape of variable bert/embeddings/LayerNorm/beta:0 ((128,)) doesn't match with shape of tensor bert/embeddings/LayerNorm/beta ([768]) from checkpoint reader,麻烦作者帮忙解决下
你这是用pytorch吗?
我也是这个问题好像是因为这个问题
使用albert_tiny_zh_google预训练模型,args.py 文件配置:
模型目录
model_dir = os.path.join(file_path, 'albert_tiny_zh_google/')
config文件
config_name = os.path.join(file_path, 'albert_config/albert_config_tiny_google.json')
ckpt文件名称
ckpt_name = os.path.join(model_dir, 'albert_model.ckpt')
输出文件目录
output_dir = os.path.join(file_path, 'albert_tiny_zh_google/')
vocab文件目录
vocab_file = os.path.join(file_path, 'albert_tiny_zh_google/vocab.txt')