mirror of
https://github.com/wassname/keras-contrib.git
synced 2026-06-27 16:10:11 +08:00
Fix tests
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user