Check this issue: https://github.com/Theano/Theano/issues/5608
Using scan for that is a bad idea, it would be very slow. There isn't a very good solution right now, but in this issue, it indicate some way to do that. Fred On Thu, May 4, 2017 at 5:58 AM Andre Holzner <[email protected]> wrote: > Good morning, > > I want to get the 2nd (and possibly 3rd) highest value in a 2D tensor > (output of a convolutional layer). > > What would be the simplest way of implementing this in Theano ? > > I saw that there is support for iterating ( > http://deeplearning.net/software/theano/library/scan.html ) > and IfElse operations ( > http://deeplearning.net/software/theano/tutorial/conditions.html), that > in principle should allow me to implement this ? Will this also generate > CUDA code when I run > with the GPU backend or will the operation be performed on the CPU ? > > thanks a lot, > > Andre > > -- > > --- > 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 [email protected]. > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
