Discussion:
[theano-users] How it is possible Theano sum gives these results ?
Feras Almasri
2017-10-17 16:03:12 UTC
Permalink
arr = np.ones((2,100,100)).astype(np.float32)x = T.ftensor3('x')
tester = T.sum(x)
tester2k = T.sum(x, axis=2)


s1 = theano.function([x], tester)
s2k = theano.function([x], tester2k)




print s1(arr)
print s2k(arr)




The first gives 5625 instead of 20000

The second gives 30 instead of 100

[ 30. 30. 30. 30. 30. 30. 30. 30. 30. 30. 30. 30. 30. 30.
30. 30. 30. 30. 30. 30. 30. 30. 30. 30. 30. 30. 30. 30.
30. ..................
--
---
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.
Loading...