On Thu, Oct 06, 2016, Beatriz G. wrote: > I can not use downsamaple.max_pool_2d, how it is called now? > theano.tensor.signal.pool.pool_2d () or theano.tensor.signal.pool. > max_pool_2d_same_size()
The equivalent is pool_2d(..., mode='max'). max_pool_2d_same_size is used when you want to zero out the elements that are not the local max, and keep a tensor that has the same size. > > regards. > > El martes, 1 de marzo de 2016, 3:02:48 (UTC+1), Michael Klachko escribió: > > > > To answer my own question, the new code for average pooling is about 4 > > times faster. > > > > > > > > On Friday, February 26, 2016 at 2:05:10 PM UTC-8, Michael Klachko wrote: > >> > >> Thanks! Actually, it's theano.tensor.signal.pool. > >> Previously, to implement averaging pooling operation, I used the > >> following code: > >> > >> pooled_out = TSN.images2neibs(ten4=conv_out, neib_shape= > >> poolsize, mode='ignore_borders').mean(axis=-1) > >> new_shape = T.cast(T.join(0, conv_out.shape[:-2], > >> T.as_tensor([conv_out.shape[2 > >> ]/poolsize[0]]), > >> T.as_tensor([conv_out.shape[3 > >> ]/poolsize[1]])), 'int64') > >> pooled_out = T.reshape(pooled_out, new_shape, ndim=4) > >> > >> Where TSN is theano.sandbox.neighbours. I wonder if there's any speed > >> advantage to replace this code with: > >> > >> pooled_out = pool.pool_2d(conv_out, ds=poolsize, ignore_border=True, > >> st=None, padding=(0,0), mode=pooltype) > >> > >> > >> > >> On Friday, February 26, 2016 at 6:06:12 AM UTC-8, nouiz wrote: > >>> > >>> theano.tensor.nnet.pool > >>> > >>> Fred > >>> > >>> On Thu, Feb 25, 2016 at 7:56 PM, Michael Klachko <[email protected]> > >>> wrote: > >>> > >>>> I'm running the latest dev version, where do I find this new 'pool' > >>>> module? > >>>> > >>>> -- > >>>> > >>>> --- > >>>> 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. -- Pascal -- --- 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.
