def one_hot(x, m=None):
    if m is None:
        m = T.cast(T.max(x) + 1, 'int32')

    return T.eye(m)[T.cast(x, 'int32')]
Browse all index content.
dataset/ETHPy150Open Lasagne/Lasagne/lasagne/utils.py/one_hot--crossover with--dataset/ETHPy150Open algolia/algoliasearch-client-python/algoliasearch/index.py/Index.browse_all