Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question in Example Code #17

Open
shyamupa opened this issue Jul 8, 2015 · 0 comments
Open

Question in Example Code #17

shyamupa opened this issue Jul 8, 2015 · 0 comments

Comments

@shyamupa
Copy link

shyamupa commented Jul 8, 2015

I am new to theano, so maybe my question does not make any sense.
In the example here, in the create_prediction function,

if greedy:
            outputs_info = [dict(initial=self.priming_word, taps=[-1])] + [initial_state_with_taps(layer) for layer in self.model.layers[1:-1]]
            result, _ = theano.scan(fn=step,
                                n_steps=200,
                                outputs_info=outputs_info)
else:
            outputs_info = [initial_state_with_taps(layer, num_examples) for layer in self.model.layers[1:]]
            result, _ = theano.scan(fn=step,
                                    sequences=[inputs.T], # slice over each time step, so step fn. gets a sentence 
                                outputs_info=outputs_info)

why did you choose n_steps to be 200 for greedy? from what I understand it should be the same as the length of the longest sentence(because you padded things in the input matrix)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant