For uspample = 4, something like this:
        output = T.zeros(out_size, dtype=theano.config.floatX)
        for i in range(upsample):
            for j in range(upsample):
                output = T.set_subtensor(output[:, :,
i::upsample,j::upsample], input)


will give you

array([[[[ 1.,  1.,  1.,  1.,  2.,  2.,  2.,  2.],

         [ 1.,  1.,  1.,  1.,  2.,  2.,  2.,  2.],

         [ 1.,  1.,  1.,  1.,  2.,  2.,  2.,  2.],

         [ 1.,  1.,  1.,  1.,  2.,  2.,  2.,  2.],

         [ 3.,  3.,  3.,  3.,  4.,  4.,  4.,  4.],

         [ 3.,  3.,  3.,  3.,  4.,  4.,  4.,  4.],

         [ 3.,  3.,  3.,  3.,  4.,  4.,  4.,  4.],

         [ 3.,  3.,  3.,  3.,  4.,  4.,  4.,  4.]]]])

for input array([[[[ 1.,  2.],

         [ 3.,  4.]]]])

On Mon, Aug 29, 2016 at 7:29 AM, <[email protected]> wrote:

> how did you solve this problem,I meet this problem ,too
>
> 在 2014年12月14日星期日 UTC+8上午3:28:38,Mohammad Havaei写道:
>
>> Does there exist in Theano an operation to resize a matrix by
>> interpolation or downsample it?
>>
> --
>
> ---
> 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.

Reply via email to