Giter VIP home page Giter VIP logo

Comments (4)

jerrybai1995 avatar jerrybai1995 commented on July 16, 2024

You mean the case where you want to (for instance) generate the next word/character? You probably don't want to use seq_len=1, but instead an amount that is reasonable for a good history size. For instance, you can use seq_len=100, so that the previous 100 tokens will contribute to the next prediction (which is output[:,:,-1]).

Let's say you have input x with dimension (N, L) where L=100 now. Then evaluating model(x) will give you an output z of (N, L) as well, where z_i is TCN's prediction of the next token after x_i. TCN's signature is very similar to that of the RNN/LSTM in PyTorch.

Hope this helps :-)

from tcn.

loretoparisi avatar loretoparisi commented on July 16, 2024

@jerrybai1995 yes this is the case. Thanks! Regarding the words split for next token, supposed to set seq_len=100 it means the next 100 chars i.e. it could break on a subword?

from tcn.

jerrybai1995 avatar jerrybai1995 commented on July 16, 2024

Setting seq_len=100 means use (up to) the previous 100 tokens (word or char) for prediction. If you are doing character level language modeling, then yes, we could be breaking on a subword.

from tcn.

loretoparisi avatar loretoparisi commented on July 16, 2024

@jerrybai1995 thanks ok so this means I should use the word_cnn rather than the char_cnn to avoid subwords. Thank you.

from tcn.

Related Issues (20)

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.