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
https://blog.csdn.net/rensihui
MIT License
1.78k stars 405 forks source link

AttributeError: 'tuple' object has no attribute 'layer' #74

Closed Allensmile closed 2 years ago

Allensmile commented 2 years ago

您好,测试Keras-TextClassification/test/tet_char_bert_embedding.py脚本报错AttributeError: 'tuple' object has no attribute 'layer',请问是什么问题?谢谢 tf和Keras版本如下: tf.version '1.15.0' keras.version '2.2.4'

yongzhuo commented 2 years ago

这个是版本问题的报错,试试 tf==1.14, 以及keras-bert==0.41.0呢