david-vazquez / mcv-m5

Master in Computer Vision - M5 Visual recognition
13 stars 51 forks source link

How to use bilinear2D layer #30

Closed amartia closed 7 years ago

amartia commented 7 years ago

I'm trying to use the bilinear2D function in layers/ourlayers.py and I'm having an error because it wants to use theano but it is not always imported

dim_ordering = K.image_dim_ordering()
if dim_ordering == 'th':
    import theano
    from theano import tensor as T

Is there a way to use this function with the Tensorflow backend or do we have to implement it?

For the moment, I've replaced it by the UpSampling2D layer but I would like to use the bilinear one.

In any case, what is the proper way to call this function?

Thank you

david-vazquez commented 7 years ago

I have uploaded a bilinear initializer in intializations/initializations.py Forget about the previous implementation that only worked for Theano.