Bruno Messias
2017-07-05 15:53:22 UTC
For didactic reasons, I am trying to implement a "activation" function
a, x, y = T.matrices("a", 'x','y')
b = T.scalars("b")
def custom(val):
T.log(val)
z_switch = T.switch(T.gt(a,b), T.true_div(T.add(T.pow(x, qEff),0), 2),
T.log(y))
f_switch = theano.function([a, b, x, y], z_switch,
mode=theano.Mode(linker='vm'))
return f_switch(val, 0, val, val)
Then I get the following error
Expected an array-like object, but found a Variable: maybe you are trying to call a function on a (possibly shared) variable instead of a numeric array?
Repeating> this is only for didactic purposes. There are any good tutorial about this?
a, x, y = T.matrices("a", 'x','y')
b = T.scalars("b")
def custom(val):
T.log(val)
z_switch = T.switch(T.gt(a,b), T.true_div(T.add(T.pow(x, qEff),0), 2),
T.log(y))
f_switch = theano.function([a, b, x, y], z_switch,
mode=theano.Mode(linker='vm'))
return f_switch(val, 0, val, val)
Then I get the following error
Expected an array-like object, but found a Variable: maybe you are trying to call a function on a (possibly shared) variable instead of a numeric array?
Repeating> this is only for didactic purposes. There are any good tutorial about this?
--
---
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.