Fix tests

This commit is contained in:
Somshubra Majumdar
2017-02-27 22:54:52 -06:00
parent 4aa331d548
commit 1986348465
@@ -86,6 +86,11 @@ def test_sub_pixel_upscaling():
for scale_factor in [2, 3, 4]:
input_data = np.random.random((nb_samples, 4 * (scale_factor ** 2), nb_row, nb_col))
if K.backend() == 'theano':
K.set_image_dim_ordering('th')
else:
K.set_image_dim_ordering('tf')
if K.image_dim_ordering() == 'tf':
input_data = input_data.transpose((0, 2, 3, 1))