yanwii / dynamic-seq2seq Goto Github PK
View Code? Open in Web Editor NEWseq2seq中文聊天机器人
seq2seq中文聊天机器人
有什么办法让他看起来不是特别傻吗?
只有个别语句出现了这种问题 实在是想不明台为什么
您好!
非常感謝您提供這樣如此方便的工具來操作
想問是否能提供一個接口
來放入pre training的word embedding?
请问现在项目中的模型是训练好的吗?测试一下效果很差。。。是都需要重新训练模型吗?
出现如下错误,请帮忙解答:
ValueError: Attempt to reuse RNNCell <tensorflow.contrib.rnn.python.ops.core_rnn_cell_impl.LSTMCell object at 0x0000000007E92E48> with a different variable scope than its first use. First use of cell was with scope 'BidirectionalEncoder/bidirectional_rnn/fw/lstm_cell', this attempt is with scope 'BidirectionalEncoder/bidirectional_rnn/bw/lstm_cell'. Please create a new instance of the cell if you would like it to use a different set of weights. If before you were using: MultiRNNCell([LSTMCell(...)] * num_layers), change to: MultiRNNCell([LSTMCell(...) for _ in range(num_layers)]). If before you were using the same cell instance as both the forward and reverse cell of a bidirectional RNN, simply create two instances (one for forward, one for reverse). In May 2017, we will start transitioning this cell's behavior to use existing stored weights, if any, when it is called with scope=None (which can lead to silent model degradation, so this error will remain until then.)
您好,我对您的这个项目很感兴趣,但是您可以提供preprocessing/dec.vocab
, preprocessing/dec.segement
, preprocessing/enc.vocab
, preprocessing/enc.segement
这些数据吗?
非常感谢!
我按照你的数据去训练,但是没有收敛,
if my A and Q fiie line over 10, it not good for train, tensorflow.python.framework.errors_impl.InvalidArgumentError: logits and labels must have the same first dimension, got logits shape [20,339] and labels shape [22]
('tensorflow version: ', '1.4.1')
Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 0.482 seconds.
Prefix dict has been built succesfully.
encoder_vocab_size 1930
decoder_vocab_size 3084
2018-07-24 16:16:14.410099: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1
model/chatbot_seq2seq.ckpt--1
迭代5w次左右
项目中的天气查询怎么可以问一个地方的天气,chatbot自动查询出来呢,求指教大佬
Traceback (most recent call last):
File "seq2seq.py", line 160, in
if sys.argv[1]:
IndexError: list index out of range
Traceback (most recent call last):
File "seq2seq.py", line 382, in
seq = seq2seq()
File "seq2seq.py", line 54, in init
time_major=True)
File "/Users/LymanYoung/source/git_tensorflow/seq2seq-demo/dynamic-seq2seq/dynamic_seq2seq_model.py", line 61, in init
self._make_graph()
File "/Users/LymanYoung/source/git_tensorflow/seq2seq-demo/dynamic-seq2seq/dynamic_seq2seq_model.py", line 85, in _make_graph
self._init_decoder()
File "/Users/LymanYoung/source/git_tensorflow/seq2seq-demo/dynamic-seq2seq/dynamic_seq2seq_model.py", line 221, in _init_decoder
decoder_fn_train = seq2seq.simple_decoder_fn_train(encoder_state=self.encoder_state)
AttributeError: module 'tensorflow.contrib.seq2seq' has no attribute 'simple_decoder_fn_train'
how to Concatenate the final state? I tried tf.concat((encoder_fw_state, encoder_bw_state), 2), but it return error. thanks.
encoder_vocab_size设置多少合理?
第一次训练设置7000
但是第二次不设置7000 就会出现问题
这个该如何设置?
每次回答后面都会带一个__EOS__,这是为啥
我看着就是词频统计然后给句子做成了向量
我看preprocess.py 中没有过滤掉词频较小的词,这样数据量一大,词典就很大, 而且很多低频词,这样做seq2seq是不是不太合理?
假如把语料库改成你的5000句的
即:python prepare_dialog.py 5000
再进行训练 python seq2seq.py retrain
出现这个错误
InvalidArgumentError (see above for traceback): logits and labels must have the same first dimension, got logits shape [2800,5970] and labels shape [2860] [[Node: sequence_loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits = SparseSoftmaxCrossEntropyWithLogits[T=DT_FLOAT, Tlabels=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](sequence_loss/Reshape, sequence_loss/Reshape_1)]]
请问这是什么问题?
在进行第一轮训练时,当step101结束后报错:logits and labels must have the same first dimension, got logits shape [2800,9003] and labels shape [2860],不知道该怎么调整代码的label与logits长度相等。
请问,目前项目还维护吗?多轮对话功能有进展吗?
Sent with GitHawk
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.