albert_zh
albert_zh copied to clipboard
LCQMC.zip + albert_xlarge_zh_183k.zip ValueError: Shape of variable bert/embeddings/LayerNorm/beta:0 ((312,)) doesn't match with shape of tensor bert/embeddings/LayerNorm/beta ([2048]) from checkpoint reader.
完全按照说明来,为什么还会出现shape不一致情况呢
312是tiny的配置文件里的一个维度; 你如果使用xlarge,那么配置文件的名称也要变一变哦,你看看albert_config文件夹下有xlarge的配置文件。
恩 恩。 想问下,albert对GPU的显存 还是跟bert一样有要求么,你对比过么。
我运行bert和albert,对gpu的显存消耗差不多,一样参数的时候还是会出现oom
312是tiny的配置文件里的一个维度; 你如果使用xlarge,那么配置文件的名称也要变一变哦,你看看albert_config文件夹下有xlarge的配置文件。 @brightmart 我也遇到了类似的问题,报错信息是: ValueError: Shape of variable bert/pooler/dense/bias:0 ((128,)) doesn't match with shape of tensor bert/pooler/dense/bias ([768]) from checkpoint reader. 我是自己训练了一个中文的预训练albert模型,是直接把预训练albert时的配置文件拿过来用了,我的配置文件内容是: "attention_probs_dropout_prob": 0.1, "directionality": "bidi", "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 128, "initializer_range": 0.02, "intermediate_size": 3072, "max_position_embeddings": 512, "num_attention_heads": 8, "num_hidden_layers": 12, "pooler_fc_size": 768, "pooler_num_attention_heads": 12, "pooler_num_fc_layers": 3, "pooler_size_per_head": 128, "pooler_type": "first_token_transform", "type_vocab_size": 2, "vocab_size": 20974, "embedding_size": 128, "ln_type":"postln" 请问应该怎么修改呢?
@parkourcx 请问解决?