quantalea / AleaTK

Library for general purpose numerical computing and Machine Learning based on tensors and tensor expressions.
http://www.aleatk.com
Apache License 2.0
75 stars 25 forks source link

ReduceMean divides by the whole size of the matrix #5

Open HunorSzabo opened 7 years ago

HunorSzabo commented 7 years ago

During implementation of different layers I noticed that ReduceMean divides by the full size of the matrix instead of only the reduced index sizes as expected by different implementations implemented R, Numpy, Matlab, etc.

Please have a look at the tests as an example.

Please feel free to adjust the coding style, optimize the implementation of the PR, mainly it was for a topic to discussion.

Thanks for the time and attention

soloman817 commented 7 years ago

good, this sounds like a bug.