jiangxinyang227 / nlp-project Goto Github PK
View Code? Open in Web Editor NEWincluding text classifier, language model, pre_trained model, multi_label classifier, text generator, dialogue. etc
including text classifier, language model, pre_trained model, multi_label classifier, text generator, dialogue. etc
你好!情感分析中,请问一下你用什么语料训练的词向量?
sentences = LineSentence("corpus.txt")
阅读理解等项目大概什么时候会更新呢 期待着
你好,非常喜欢你在文本分类中所说的框架,整体非常清晰。
请教下楼主,无监督单文本关键词提取有没有研究过,
我所知道的只有一个textrank,貌似效果不太好,
如果有什么好的blog或者开源项目,求推荐,谢谢!
File "D:\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow\python\training\saver.py", line 825, in init
self.build()
File "D:\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow\python\training\saver.py", line 837, in build
self._build(self._filename, build_save=True, build_restore=True)
File "D:\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow\python\training\saver.py", line 862, in _build
raise ValueError("No variables to save")
ValueError: No variables to save
想问一下这是什么原因呢?
非常抱歉提这个issue,您能把数据搞个一两条附上去吗?内容随意,是新手,想学习下您这个项目,但数据这块一直弄不成,非常感谢,您也可以发我邮箱,[email protected] 非常感谢
File "train.py", line 125, in train
self.config["batch_size"]):
File "/home/rejae/PycharmProjects/NLP-Project-master/text_classifier/data_helpers/eval_data.py", line 155, in next_batch
y = y[perm]
TypeError: only integer scalar arrays can be converted to a scalar index
需要将eval_data中:
def next_batch(self, x, y, batch_size):
perm = np.arange(len(x))
#print(type(y) is list) list need transfer to array.
#out_images = np.array(X_train)[indices.astype(int)]
np.random.shuffle(perm)
x = x[perm]
#y = y[perm]
y = np.array(y)[perm] #后修改
r = tf.matmul(tf.transpose(H, [0, 2, 1]), tf.reshape(self.alpha, [-1, self.config["sequence_length"], 1]))
报错:
InvalidArgumentError (see above for traceback): In[0].dim(0) and In[1].dim(0) must be the same: [128,512,50] vs [256,50,1]
[[Node: Attention/MatMul_1 = BatchMatMul[T=DT_FLOAT, adj_x=false, adj_y=false, _device="/job:localhost/replica:0/task:0/cpu:0"](Attention/transpose, Attention/Reshape_3)]]
NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
Key conv-maxpool-3/cnn_b not found in checkpoint
[[node save/RestoreV2 (defined at /root/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/tensorflow/contrib/tpu/python/tpu/tpu_estimator.py:2418) = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_INT64, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
作者你好 。我用bert的时候,我看到他的官方代码最大的长度是512 用于大文本的时候 例如超过512 效果是不是马上就会变差的了?
初始化Predictor对象,调用predict方法,运行test.py文件后,报错:
InvalidArgumentError (see above for traceback): Inputs to operation transformer/transformer-1/multi_head_atten/Select of type Select must have the same size and shape. Input 0: [8,100,100] != input 1: [1024,100,100]
请问怎么解决呢?
不好意思。是我搞错了。。无法删除这个标题
states, hidden = self.encoder(embeddings.permute([1, 0, 2]))#[75,64,50],[seq_len, batch, embed_dim]
encoding = torch.cat([states[0], states[-1]], dim=1)#张量拼接[32,512]
对这一段没看懂 能方便加您vx,仔细请教吗 愿意付费
可以一起交流吗
你好,请问能提供整个系列数据集的下载链接吗?谢谢
感激涕零,溢于言表!
你好。很感谢您提供的代码教程。目前发现transformer训练准确度低。只有不到60%,大大低于TextCNN的85%,请问您当时测试也是如此吗?若是提高,可以给点建议吗?谢谢
text_classifier/models/transformer.py
如题,我clone了项目用eclipse导入,提示“No projects are found to import”,所以是不是用别的IDE去开发的,pycharm??
我运行的时候训练的时候准确率都还是不错的。在验证的时候就会越来越差。是否过拟合了呢?
预测代码都在predictors/predict.py中,初始化Predictor对象,调用predict方法即可。
请问这个有例子可以给看看么?
I try to build your code, but can;t find the raw data.
So Could you help to provide the datasets used in your program? thanks
outputs, current_state = tf.nn.bidirectional_dynamic_rnn(lstm_fw_cell, lstm_bw_cell,embedded_words, dtype=tf.float32, scope="bi-lstm" + str(idx))
embedded_words = tf.concat(outputs, 2)
# 将最后一层Bi-LSTM输出的结果分割成前向和后向的输出
outputs = tf.split(embedded_words, 2, -1)
为什么先对最后一层进行concat后,又split拆开使用,都是针对axis=2拼接和拆开,直接使用bidirectional_dynamic_rnn, 返回的outputs元组不行么?
在text_generator和text_generator_raw缺少了训练数据
在fine_grained_sentiment_analysis
ModuleNotFoundError: No module named 'gate_conv'
漏了这个
如题。谢谢。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.