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

老哥,报了的tensorflow包的错,tensorflow的版本可以提供下么 #60

Closed BetterWill closed 3 years ago

BetterWill commented 3 years ago

(keras_text) x01@q:~/anaconda3/envs/keras_text/lib/python3.6/site-packages/keras_textclassification/m01_FastText$ python train.py Using TensorFlow backend. Traceback (most recent call last): File "train.py", line 27, in from keras_textclassification.m01_FastText.graph import FastTextGraph as Graph File "/home/xxxy01/anaconda3/envs/wr_keras_text/lib/python3.6/site-packages/keras_textclassification/m01_FastText/graph.py", line 9, in from keras_textclassification.base.graph import graph
File "/home/xxxy01/anaconda3/envs/wr_keras_text/lib/python3.6/site-packages/keras_textclassification/base/graph.py", line 11, in from keras_textclassification.keras_layers.keras_lookahead import Lookahead File "/home/xxxy01/anaconda3/envs/wr_keras_text/lib/python3.6/site-packages/keras_textclassification/keras_layers/keras_lookahead.py", line 9, in from keras import backend as K File "/home/xxxy01/anaconda3/envs/wr_keras_text/lib/python3.6/site-packages/keras/init.py", line 3, in from . import utils File "/home/xxxy01/anaconda3/envs/wr_keras_text/lib/python3.6/site-packages/keras/utils/init.py", line 6, in from . import conv_utils File "/home/xxxy01/anaconda3/envs/wr_keras_text/lib/python3.6/site-packages/keras/utils/conv_utils.py", line 9, in from .. import backend as K File "/home/xxxy01/anaconda3/envs/wr_keras_text/lib/python3.6/site-packages/keras/backend/init.py", line 89, in from .tensorflow_backend import * File "/home/xxxy01/anaconda3/envs/wr_keras_text/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 5, in import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow'

yongzhuo commented 3 years ago

支持keras==2.2.4的版本,默认是tensorflow==1.12.0。理论上1.11----1.14都可以