hit-computer / sc-lstm Goto Github PK
View Code? Open in Web Editor NEWImplement SC-LSTM model for text generation in control of words, in Python/TensorFlow
Implement SC-LSTM model for text generation in control of words, in Python/TensorFlow
在generation的时候,input_data应该是不知道的。然而在代码中仍使用:
line62: res_wr = tf.matmul(inputs[:, time_step, :], sc_wr)
line71: (cell_output, state, cell_outputs) = cell(inputs[:, time_step, :], state, sc_vec)
难道不是使用每个时刻预测的结果作为输入吗,是不是写错了?
Traceback (most recent call last):
File "C:/Users/user/PycharmProjects/textgeneration/Preprocess.py", line 77, in
vocab, _ = Read_WordVec(config)
File "C:/Users/user/PycharmProjects/textgeneration/Preprocess.py", line 36, in Read_WordVec
assert len(wordLS) == config.vocab_size
AssertionError
Sir @hit-computer @smallt-TAO ,thanks for this opensource repository........ I would like to know about how to create the vect5.txt file
thanks
@hit-computer 多谢!!!
DATE文件夹中TrainingData_Keywords.txt=====》需要改成TrainingData_keywords.txt才能运行。
你好~
从之前的 char-rnn 开始关注,到如今的 SC-LSTM,我也一直觉得现在文本生成的质量还不过关,而这步却是很多其他模型的基础。
看到这个模型和那个基于关键字 Attention 的 Issue,有个小疑惑:用 RNN 做文本生成时,能否基于 Attention 考虑词性、位置等信息,或者使用 Beam Search 这样的一些技巧。
您好,关于训练使用的损失函数,您是不是没有按照论文中给出损失函数来实现? 我看您是直接使用一个tensorflow 内置的方法 sequence_loss_by_example.
如果是我没注意,能否告诉我你是在哪里改进的损失函数?
如果没有的话,能否给改code实现一下哈? 按照你的这个写法,对我来说感觉不太好改code来实现论文的损失函数.
您好,感谢您的代码。我在运行train.py程序时,程序print出第一个epoch的learning rate,准备计算cost时,程序突然中断,并提示:段错误 (核心已转储)。请问您遇到过这个问题吗?可以提供一下解决思路吗?
您好,感谢您实现的代码。我训练网络的时候训练数据有100 0000条(一百多兆),预处理之后的数据文件就有49G,训练的时候都是out of memory,请问您是怎么解决大数据量的训练问题呢?
Epoch: 1 Learning rate: 0.0010
5-step perplexity: 24.645 cost-time: 2.26 s
10-step perplexity: 25.724 cost-time: 0.92 s
15-step perplexity: 26.257 cost-time: 0.96 s
20-step perplexity: 26.411 cost-time: 0.78 s
25-step perplexity: 25.416 cost-time: 0.73 s
在出现以上信息后提示
DataLossError (see above for traceback): truncated record at 3055259
调试了几次还是不行是tensorflow版本问题么?
在preprocess.py文件中:data[i][:_size] = tmp这一行代码,其中_size要小于num_steps,这就限制了关键字对应数据的大小,可不可以直接根据字符的长度进行数据处理呢
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.