import tensorflow as tf

        start, stop = 0, start
    if K.backend() == 'theano':
        from theano import tensor as T
        range_ = T.arange(start, stop)
    else:
        assert K.backend() == 'tensorflow'
        import tensorflow as tf
        range_ = tf.range(start, stop)
    if dtype is not None:
        range_ = K.cast(range_, dtype=dtype)
    return range_


def ndim(a):
