Git Product home page Git Product logo

Comments (2)

defineZYP avatar defineZYP commented on June 27, 2024

你好,这里的decoder结构就是最原始的decoder结构,decoder不仅仅需要encoder的输出作为输入(一般在中间进行,即第二个attention模块),它还需要上一个时间步的序列作为初始输入。举一个例子,假设当前序列数据共n步,为[t1, t2, ..., tn],对于decoder结构,它在最开始被设计出来的目的其实是预测下一步的结果,由于我们想要的是通过decoder重建当前的n步序列,因此我们需要提供前n-1步的序列。一般而言,decoder有两个主要的模块,self-attention和encoder-decoder attention。对于前者,需要接收前n-1步的序列,对于后者,则利用前者的输出和encoder的输出进行attention操作。文章里的描述可能有一点绕,但其实就是对当前序列进行右移然后再做padding。同学你也可以参考一些机器翻译的例子这样可能更直观一些,如https://zhuanlan.zhihu.com/p/338817680。

from adt.

iceabing avatar iceabing commented on June 27, 2024

好耶,谢谢师兄解答!

from adt.

Related Issues (1)

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.