Open HuwCampbell opened 7 years ago
This is strange. I think they use "toScalarR", etc., and only create a size-1 vector for the result in "toScalarAux". Unless there is a bug these functions should be very fast.
I don't think it's all the time, just when the (2D) matrix is column oriented due the the flatten
inside maxIndex'
.
I have punched out to C with a ForeignPtr for my particular use case, so this isn't affecting me personally anymore.
Ah, I see now. This implementation is very bad and must be changed. Thanks for your bug report!
This makes them a bit slow.
I was using these in my neural network for the max pooling layer, and it was taking up to a quarter of the run time in a simple network just to do the copy before running the actual operation.