|
I'm just learning theano and I'm having some basic issues. I've create a simple p-norm function which works, but I want to also create an L2norm function but I'm getting an error.
Also, is there a library of theano functions already implemented to do simple things like p-norm? Thanks |
|
pnorm is a Theano function. You can't call a Theano function with symbolic variable. You need to call it with real value. I think you want to define pnorm like this: def pnorm(x, y, p): return pow(theano.tensor.sum((x - y) ** 2), p) You will be able to call it with symbolic variable and your example should work. |
What's the error message?