I think this PR fix this:

https://github.com/Theano/Theano/pull/5175

Can you confirm try it? The PR only miss a test before being merged.

thanks

On Tue, Nov 1, 2016 at 12:47 PM, Samtzai <artz...@gmail.com> wrote:

> Hi Fred,
>
> Yes, it was fixed, but when upgrading to the new Theano-0.9.0.dev4 the
> problem arises again. Turning back to Theano-0.9.0.dev4 solves the problem:
>
>
>
>   File "/home/samtzai/anaconda2/lib/python2.7/site-packages/pymc3/theanof.py",
> line 60, in gradient
>     return tt.concatenate([gradient1(f, v) for v in vars], axis=0)
>   File "/home/samtzai/anaconda2/lib/python2.7/site-packages/pymc3/theanof.py",
> line 48, in gradient1
>     return tt.flatten(tt.grad(f, v, disconnected_inputs='warn'))
>   File 
> "/home/samtzai/anaconda2/lib/python2.7/site-packages/theano/gradient.py",
> line 553, in grad
>     grad_dict, wrt, cost_name)
>   File 
> "/home/samtzai/anaconda2/lib/python2.7/site-packages/theano/gradient.py",
> line 1317, in _populate_grad_dict
>     rval = [access_grad_cache(elem) for elem in wrt]
>   File 
> "/home/samtzai/anaconda2/lib/python2.7/site-packages/theano/gradient.py",
> line 1272, in access_grad_cache
>     term = access_term_cache(node)[idx]
>   File 
> "/home/samtzai/anaconda2/lib/python2.7/site-packages/theano/gradient.py",
> line 965, in access_term_cache
>     output_grads = [access_grad_cache(var) for var in node.outputs]
>   File 
> "/home/samtzai/anaconda2/lib/python2.7/site-packages/theano/gradient.py",
> line 1272, in access_grad_cache
>     term = access_term_cache(node)[idx]
>   File 
> "/home/samtzai/anaconda2/lib/python2.7/site-packages/theano/gradient.py",
> line 965, in access_term_cache
>     output_grads = [access_grad_cache(var) for var in node.outputs]
>   File 
> "/home/samtzai/anaconda2/lib/python2.7/site-packages/theano/gradient.py",
> line 1272, in access_grad_cache
>     term = access_term_cache(node)[idx]
>   File 
> "/home/samtzai/anaconda2/lib/python2.7/site-packages/theano/gradient.py",
> line 1189, in access_term_cache
>     i, term.type.dtype))
> TypeError: Elemwise{mul,no_inplace}.grad illegally  returned an
> integer-valued variable. (Input index 1, dtype bool)
>
> Regards
>
>
>
>
>
>
>
>
> El lunes, 17 de noviembre de 2014, 21:58:39 (UTC+1), nouiz escribió:
>>
>> Hi,
>>
>> My guess is that this is fixed in the development version of Theano. Just
>> update Theano as done here:
>>
>> http://www.deeplearning.net/software/theano/install.html#ble
>> eding-edge-install-instructions
>>
>> If that do not fix it, tell me. But from memory, this was fixed.
>>
>> Fred
>>
>> On Mon, Nov 17, 2014 at 2:32 PM, Ashutosh Modi <modias...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I have a complicated architecture and I am calculating gradients wrt to
>>> diff parameters, but I am getting following strange error, what is this
>>> indicative of? I am not getting any clue why is this error popping up?
>>>
>>> *TypeError: Join.grad illegally  returned an integer-valued variable.
>>> (Input index 1, dtype int32)*
>>> The sequence steps which lead to this error are:
>>>
>>> File "/localDisk/work/workspaces/python/sc/src/learner.py", line 304,
>>> in createUpdates
>>> currentGrad = T.grad(self.cost,p)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 438, in grad
>>> outputs, wrt, consider_constant)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 809, in _populate_var_to_app_to_idx
>>> account_for(output)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 805, in account_for
>>> account_for(ipt)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 805, in account_for
>>> account_for(ipt)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 805, in account_for
>>> account_for(ipt)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 805, in account_for
>>> account_for(ipt)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 805, in account_for
>>> account_for(ipt)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 805, in account_for
>>> account_for(ipt)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 805, in account_for
>>> account_for(ipt)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 805, in account_for
>>> account_for(ipt)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 805, in account_for
>>> account_for(ipt)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 780, in account_for
>>> connection_pattern = _node_to_pattern(app)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 665, in _node_to_pattern
>>> connection_pattern = node.op.connection_pattern(node)
>>> File 
>>> "/Library/Python/2.7/site-packages/Theano/theano/scan_module/scan_op.py",
>>> line 1373, in connection_pattern
>>> ils)
>>> File 
>>> "/Library/Python/2.7/site-packages/Theano/theano/scan_module/scan_op.py",
>>> line 1301, in compute_gradient
>>> known_grads={y: g_y}, wrt=x)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 529, in grad
>>> grad_dict, wrt, cost_name)
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 1213, in _populate_grad_dict
>>> rval = [access_grad_cache(elem) for elem in wrt]
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 1173, in access_grad_cache
>>> term = access_term_cache(node)[idx]
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 895, in access_term_cache
>>> output_grads = [access_grad_cache(var) for var in node.outputs]
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 1173, in access_grad_cache
>>> term = access_term_cache(node)[idx]
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 895, in access_term_cache
>>> output_grads = [access_grad_cache(var) for var in node.outputs]
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 1173, in access_grad_cache
>>> term = access_term_cache(node)[idx]
>>> File "/Library/Python/2.7/site-packages/Theano/theano/gradient.py",
>>> line 1091, in access_term_cache
>>> term.type.dtype))
>>>
>>> TypeError: Join.grad illegally returned an integer-valued variable.
>>> (Input index 1, dtype int32)
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "theano-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to theano-users...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "theano-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to theano-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to theano-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to