佐藤優
2017-08-25 04:58:20 UTC
I saw follown defferences:
import theano
import theano.tensor as T
import numpy as np
o = np.ones((1,2,3))
o2 = np.ones((2,1))
o2_shared = theano.shared(ones((2, 1)))
print((o2 + o).shape)
print((o2_shared + o).shape)
result is
(1, 2, 3)
[1 2 1]
Maybe, broadcasting result is difference.
But changing the order of calculation:
import theano
import theano.tensor as T
import numpy as np
o = np.ones((1,2,3))
o2 = np.ones((2,1))
o2_shared = theano.shared(ones((2, 1)))
print((o + o2).shape)
print((o + o2_shared).shape.eval())
result is same as follows:
(1, 2, 3)
[1 2 3]
Is this theano.shared bug?
import theano
import theano.tensor as T
import numpy as np
o = np.ones((1,2,3))
o2 = np.ones((2,1))
o2_shared = theano.shared(ones((2, 1)))
print((o2 + o).shape)
print((o2_shared + o).shape)
result is
(1, 2, 3)
[1 2 1]
Maybe, broadcasting result is difference.
But changing the order of calculation:
import theano
import theano.tensor as T
import numpy as np
o = np.ones((1,2,3))
o2 = np.ones((2,1))
o2_shared = theano.shared(ones((2, 1)))
print((o + o2).shape)
print((o + o2_shared).shape.eval())
result is same as follows:
(1, 2, 3)
[1 2 3]
Is this theano.shared bug?
--
---
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.