yongzhuo / Keras-TextClassification

中文长文本分类、短句子分类、多标签分类、两句子相似度(Chinese Text Classification of Keras NLP, multi-label classify, or sentence classify, long or short),字词句向量嵌入层(embeddings)和网络层(graph)构建基类,FastText,TextCNN,CharCNN,TextRNN, RCNN, DCNN, DPCNN, VDCNN, CRNN, Bert, Xlnet, Albert, Attention, DeepMoji, HAN, 胶囊网络-CapsuleNet, Transformer-encode, Seq2seq, SWEM, LEAM, TextGCN

Home Page:https://blog.csdn.net/rensihui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I met some troubles when using bert

Fino2020 opened this issue · comments

AttributeError: 'tuple' object has no attribute 'layer'
when executing inbound_layers = nest.map_structure(lambda t: t._keras_history.layer,
input_tensors)

You'd better use the following package version. do not pip install keras-xlnet==0.16.0
tensorflow==1.14 keras==2.2.4 bert-keras==0.41.0