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

TypeError: ('An update must have the same type as the original shared variable #5

Closed
SeekPoint opened this issue Jun 20, 2019 · 2 comments

Comments

@SeekPoint
Copy link

ub16c9@ub16c9-gpu:/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/DeepUtteranceAggregation$ bash train.sh
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
image shape (10, 2, 50, 50)
filter shape (8, 2, 3, 3)
/usr/local/lib/python2.7/dist-packages/theano/tensor/nnet/conv.py:98: UserWarning: theano.tensor.nnet.conv.conv2d is deprecated. Use theano.tensor.nnet.conv2d instead.
warnings.warn("theano.tensor.nnet.conv.conv2d is deprecated."
/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/DeepUtteranceAggregation/model.py:515: UserWarning: DEPRECATION: the 'ds' parameter is not going to exist anymore as it is going to be replaced by the parameter 'ws'.
self.output =theano.tensor.signal.pool.pool_2d(input=conv_out_tanh, ds=self.poolsize, ignore_border=True,mode="max")
Traceback (most recent call last):
File "main.py", line 489, in
val_frequency=args.val_frequency)
File "main.py", line 408, in main
givens=dic, on_unused_input='ignore')
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function.py", line 317, in function
output_keys=output_keys)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/pfunc.py", line 449, in pfunc
no_default_updates=no_default_updates)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/pfunc.py", line 208, 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, matrix)>, shared_var.type=TensorType(float32, matrix), update_val=Elemwise{add,no_inplace}.0, update_val.type=TensorType(float64, matrix)).', 'If the difference is related to the broadcast pattern, you can call the tensor.unbroadcast(var, axis_to_unbroadcast[, ...]) function to remove broadcastable dimensions.')
ub16c9@ub16c9-gpu:/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/DeepUtteranceAggregation$

@DoliteMatheo
Copy link

The same question as yours.

@cooelf
Copy link
Owner

cooelf commented Jul 16, 2019

Have you followed the recommended version of dependencies? It seems to be a version issue. Maybe you can check the version or try THEANO_FLAGS='floatX=float32'.

Our enviroment when this work was done:

Theano 0.9.0
Cuda 8.0
Cudnn 5.1
Numpy 1.13.3

Please forgive the versions might be somewhat old for now.

@cooelf cooelf closed this as completed Aug 30, 2019
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

3 participants