Shadekur Rahman
2017-09-06 18:46:21 UTC
Trying to use theano gradient when computation graph contains T.nlinalg.svd
import theanoimport theano.tensor as T
W = theano.shared(self.get_weights(5,5)) #numpy ndarray with size(5,5)
_,e,_ = T.nlinalg.svd(W)
cost = e[0]
res = theano.grad(cost, [W]) #gives an error
getting the following error:
AttributeError: 'SVD' object has no attribute 'grad'
Does anyone know some workaround for this problem?
import theanoimport theano.tensor as T
W = theano.shared(self.get_weights(5,5)) #numpy ndarray with size(5,5)
_,e,_ = T.nlinalg.svd(W)
cost = e[0]
res = theano.grad(cost, [W]) #gives an error
getting the following error:
AttributeError: 'SVD' object has no attribute 'grad'
Does anyone know some workaround for this problem?
--
---
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.