def resize_images(X, height_factor, width_factor, dim_ordering):
    if dim_ordering == 'th':
        new_shape = tf.shape(X)[2:]
        new_shape *= tf.constant(np.array([height_factor, width_factor]).astype('int32'))
        X = permute_dimensions(X, [0, 2, 3, 1])
        X = tf.image.resize_nearest_neighbor(X, new_shape)
        return permute_dimensions(X, [0, 3, 1, 2])
    elif dim_ordering == 'tf':
        new_shape = tf.shape(X)[1:3]
        new_shape *= tf.constant(np.array([height_factor, width_factor]).astype('int32'))
        return tf.image.resize_nearest_neighbor(X, new_shape)
    else:
        raise Exception('Invalid dim_ordering: ' + dim_ordering)
Builds device report using some additional sources.
dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py/resize_images--crossover with--dataset/ETHPy150Open openstack/bareon/bareon/utils/hardware.py/extrareport