Giter Site home page Giter Site logo

seqgan's People

Contributors

zpschang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

seqgan's Issues

关于代码报错(TypeError: __new__() missing 1 required positional argument: 'attention_state')

我尝试自己生成了数据集,运行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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.