zpschang / seqgan Goto Github PK
View Code? Open in Web Editor NEWdialogue generation with seqGAN
dialogue generation with seqGAN
我尝试自己生成了数据集,运行analyzer.py生成了在训练时reader.py中reader所需的file_name_word。
在运行时发生了如下错误,
File "model.py", line 86, in build_attention_state
self.attention, self.time, self.alignments, tuple([]))
TypeError: new() missing 1 required positional argument: 'attention_state'
对应的代码为:
return tf.contrib.seq2seq.AttentionWrapperState(cell_state,
self.attention, self.time, self.alignments, tuple([]))
我查看了tensorflow文档,对应的参数声明如下
new(
_cls,
cell_state,
attention,
time,
alignments,
alignment_history,
attention_state
)
这里alignment_history,attention_state两个参数不太明确,请问tuple([])对应的哪个参数?另一个参数的值应该设为什么?我尝试加了一个tuple([]),但是依旧报错了。信息如下:
More specifically: Substructure "type=tuple str=()" is a sequence, while substructure "type=Tensor str=Tensor("g_model/decoder/decoder/while/BasicDecoderStep/decoder/attention_wrapper/Softmax_2:0", shape=(?, 40), dtype=float32)" is not
data/small/weibo_pair_train_Q.post etc
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.