rnn-tutorial-rnnlm icon indicating copy to clipboard operation
rnn-tutorial-rnnlm copied to clipboard

error:scan() got an unexpected keyword argument 'strict'

Open carrierlxk opened this issue 9 years ago • 3 comments

When I run the 'RNNTheano' in ipython file: RNNLM, an error emerges: TypeError Traceback (most recent call last) in () 2 # To avoid performing millions of expensive calculations we use a smaller vocabulary size for checking. 3 grad_check_vocab_size = 5 ----> 4 model = RNNTheano(grad_check_vocab_size, 10) 5 gradient_check_theano(model, [0,1,2,3], [1,2,3,4])

/home/carrierlxk/rnn-tutorial-rnnlm-master/rnn_theano.py in init(self, word_dim, hidden_dim, bptt_truncate) 22 # We store the Theano graph here 23 self.theano = {} ---> 24 self.theano_build() 25 26 def theano_build(self):

/home/carrierlxk/rnn-tutorial-rnnlm-master/rnn_theano.py in theano_build(self) 38 non_sequences=[U, V, W], 39 truncate_gradient=self.bptt_truncate, ---> 40 strict=True) 41 42 prediction = T.argmax(o, axis=1)

TypeError: scan() got an unexpected keyword argument 'strict'

What is the reason?

carrierlxk avatar Oct 14 '15 07:10 carrierlxk

Hm, I haven't run into this. According to the Tehano doc [1] then scan function has a strict argument. Are you maybe using an old version of Theano?

[1] http://deeplearning.net/software/theano/library/scan.html

dennybritz avatar Oct 14 '15 07:10 dennybritz

Hi, I have checked my theano version, it is version 0.6.0 NumPy version 1.9.0 Python version 2.7.8 |Anaconda 2.1.0 nose version 1.3.4

carrierlxk avatar Oct 15 '15 03:10 carrierlxk

The requirements.txt file lists Theano version 0.7.0, maybe try upgrading?

dennybritz avatar Oct 15 '15 04:10 dennybritz