Giter VIP home page Giter VIP logo

Comments (7)

rsepassi avatar rsepassi commented on May 12, 2024

We have some algorithmic problems which are quite simple.

You can see one used in the trainer test here:
https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/utils/trainer_utils_test.py

And some of the other algorithmic problems registered here:
https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/bin/t2t-datagen#L62

Do these datasets suffice for what you mean?

from tensor2tensor.

lukaszkaiser avatar lukaszkaiser commented on May 12, 2024

The algorithmic_reverse_decimal40 problem is similar. But it has only 10 symbols (digits) and they're uniformly distributed. I think it'd still be great to have a reversing problem on more realistic data, more tokens and maybe a different distribution. @ReDeiPirati would you be interested in adding one? I'd be happy to help.

from tensor2tensor.

ReDeiPirati avatar ReDeiPirati commented on May 12, 2024

@rsepassi sorry, i've missed all the dataset generated from algorithmic because i've focused my attention only at the wmt and image problems. @lukaszkaiser that is exactly what i was looking for. Well if you have some idea, i will be happy to contribute. What do you mean with realistic data? a noisy distribution? or simply a non uniform distribution?

from tensor2tensor.

lukaszkaiser avatar lukaszkaiser commented on May 12, 2024

I'm thinking about adding and algorithmic_reverse_nlplike task that:

(1) has more symbols, at least 8k, maybe 32k (more similar to word-level language tasks)
(2) chooses length from a Gaussian, not uniform distribution (or even sth more natural).
(3) chooses the symbols with np.random.zipf (https://en.wikipedia.org/wiki/Zipf%27s_law)

It's still a toy task, but at least more similar to NLP. We could then debug new networks by starting with the very toy algorithmic tasks, then trying this one, and then moving on to real NLP data. But I'll leave it to you to consider and decide what'd be best. Thanks!

from tensor2tensor.

ReDeiPirati avatar ReDeiPirati commented on May 12, 2024

Thank you for the specs, i get to work

from tensor2tensor.

ReDeiPirati avatar ReDeiPirati commented on May 12, 2024

@lukaszkaiser This is my implementation(it's not ready for a PR): reverse_generator_nlplike and the test that is almost the same as testReverseGenerator.
Some consideration:

  1. I left the max_length of the sequence as for the reverse task, because we are playing with a toy dataset;
  2. The default standard error is set 1.0 but maybe have a bit of variance will it be better? std=10-20% of the max value(as default value)?
  3. The default alpha of the Zipf's Law is set to 2.0(as used in examples). Unfortunately i haven't find some interesting value to reproduce a text-like distribution but i'have read that to model languages usually is in the range [1.1-1.6].
  4. The Zipf distribution with alpha between [1.0-2.0] produces values that are out of the max token range. I don't find normalization a good idea as suggested in this post but i can run the command until all the values are in the range(bad choice of alpha and/or tokens would never converge with this sanity check). For our purpose it's not important that the generated values overcome the range, is it?

from tensor2tensor.

lukaszkaiser avatar lukaszkaiser commented on May 12, 2024

It looks very good to me, great thanks. I'd set the Zipf's default to 1.5 maybe, judging by what you say. I also think that you need to generate one-by-one the list, or maybe I'm not understanding something in the current code. As you can see in the standard reverse now, we also shift the symbols by 2, because 0 is reserved for padding and 1 for end-of-sequence symbol. So you'd need to do that and add [1] as end-of-sequence (either only to targets or to both inputs and targets, I guess both are fine).

Great thanks for doing this :). I'll close this issue, make a PR and we can finish it there!

from tensor2tensor.

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.