-
Notifications
You must be signed in to change notification settings - Fork 228
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
theano update error when running DT_RNN_Tut tutorial #36
Comments
Hi, This is the important part of the error: TypeError: ('An update must have the same type as the original shared The shared variable is of dtype float32, but its new value is of dtype Something caused the code to upcast the data to float64. Use the theano http://deeplearning.net/software/theano/library/config.html#config.warn_float64 Maybe the files you changed don't have the data in the right dtype in it. On Sun, Sep 13, 2015 at 6:42 PM, moore269 [email protected] wrote:
|
Thanks for your help! Here, I produced the following dump when I flag for float64. The first time I see the creation of float64 is line 140. I’m not sure if it is supposed to produce float32 instead. Any ideas? data length is 11 |
You need to use that flag: warn_float64=pdb then investigate. We don't have the time to do more then guide you. Also |
My apologies, I'm just not very familiar with theano and a little overwhelmed. So far, I am just trying to get the tutorial working on a small sample of data. Maybe giving you my few steps that I took might be easier to help guide me? Again, any help is appreciated. I created train, test, and valid files in the sample_data folder each consisting of this string. and again I had only modified this part I had tried with dtype=int32, but same error. Is this how I am supposed to be preparing the data? |
Also, I had tried pdb, but wasn't sure I could conclude anything from it |
If you are just starting, I would suggest that you check this update to the https://github.com/lisa-groundhog/GroundHog/pull/37/files blocks is more documented and is supported. This is probably a better On Mon, Sep 14, 2015 at 10:41 AM, moore269 [email protected] wrote:
|
oh, this looks very useful, thanks. Is the RNN LM model implemented in blocks as well? |
Please check https://github.com/mila-udem/blocks-examples for examples of On 14 September 2015 at 11:11, moore269 [email protected] wrote:
|
data length is 11
data length is 11
data length is 11
Traceback (most recent call last):
File "DT_RNN_Tut.py", line 416, in
jobman(state, None)
File "DT_RNN_Tut.py", line 225, in jobman
name='valid_fn', updates=valid_updates)
File "/Library/Python/2.7/site-packages/theano/compile/function.py", line 309, in function
output_keys=output_keys)
File "/Library/Python/2.7/site-packages/theano/compile/pfunc.py", line 487, in pfunc
no_default_updates=no_default_updates)
File "/Library/Python/2.7/site-packages/theano/compile/pfunc.py", line 214, in rebuild_collect_shared
raise TypeError(err_msg, err_sug)
TypeError: ('An update must have the same type as the original shared variable (shared_var=<TensorType(float32, vector)>, shared_var.type=TensorType(float32, vector), update_val=Subtensor{int64}.0, update_val.type=TensorType(float64, vector)).', 'If the difference is related to the broadcast pattern, you can call the tensor.unbroadcast(var, axis_to_unbroadcast[, ...]) function to remove broadcastable dimensions.')
I just modified this part in the code:
state['path']= "data_words.npz"
state['dictionary']= "data_char_words.npz"
state['chunks'] = 'words'
I also installed the latest version of theano, tables, hdf5.
Not sure how I should proceed to get the tutorial working. Any help is appreciated, thanks!
The text was updated successfully, but these errors were encountered: