Code Monkey home page Code Monkey logo

ipython-notebooks's Issues

Minor issue in Seq2Seq tutorial

First of all, I would like to thank you! Browsing around the net could not find a seq2seq model as clear as yours. Nonetheless, I believe there is a minor issue in ipython-notebooks/tf/TF tutorial.ipynb In [26] the line:

dec_inp = ([tf.zeros_like(enc_inp[0], dtype=np.int32, name="GO")]+ enc_inp[:-1])

Should be:

dec_inp = ([tf.zeros_like(labels[0], dtype=np.int32, name="GO")] + labels[:-1])

This will enable you to have different sequence lengths and vocab sizes for dec_inp and enc_inp.

Issue with seq2seq using the TF tutorial

Would you have any ideas on what could be causing this?

magnitude = tf.sqrt(tf.reduce_sum(tf.square(dec_memory[1])))
tf.scalar_summary("magnitude at t=1", magnitude)

Truncated Traceback (Use C-c C-x to view full TB):
/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/tensor_shape.pyc in assert_has_rank(self, rank)
    596     """
    597     if self.ndims not in (None, rank):
--> 598       raise ValueError("Shape %s must have rank %d" % (self, rank))
    599 
    600   def with_rank(self, rank):

ValueError: Shape (?, 100) must have rank 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.