文本分类采用bert模型,在finetune_and_eval()报错。
Created by: glsoon
数据集为chnsenticorp
module = hub.Module(name="bert_chinese_L-12_H-768_A-12")
.....
cls_task.finetune_and_eval()
运行报错:
File "/home/*****/.local/lib/python3.6/site-packages/paddle/fluid/backward.py", line 310, in append_backward_ops op.desc, cpt.to_text(no_grad_dict[block.idx]), grad_sub_block_list)
EnforceNotMet: Input ShapeTensor cannot be found in Op reshape2 at [/paddle/paddle/fluid/framework/op_desc.cc:306] PaddlePaddle Call Stacks: 0 0x7f63a310b650p void paddle::platform::EnforceNotMet::Init<char const*>(char const*, char const*, int) + 352