• Olivier Delalleau's avatar
    Fixed optimization for exp(x) * sigmoid(-x) · c42a7494
    Olivier Delalleau 提交于
    This stability optimization didn't work for at least three reasons:
    1. It used tensor.neg(x) to identify -x, while in canonicalized form -x
       is written -1 * x.
    2. There was a typo (calling a function sigm that didn't exist).
    3. It wasn't able to parse a tree of multiplications, for instance
       something like (exp(x) * 2) * sigmoid(-x).
    
    This new version fixes all three issues. In order to solve problem #3,
    it uses a different approach that consists in parsing the optimized node
    into a so-called "multiplication tree".
    
    Currently, the structure of this tree is left unchanged. It would be
    possible to have this optimization also flatten the tree, which would
    make the code simpler (but potentially undo work performed by some other
    optimizations).
    c42a7494
名称
最后提交
最后更新
..
compile 正在载入提交数据...
gof 正在载入提交数据...
misc 正在载入提交数据...
sandbox 正在载入提交数据...
scalar 正在载入提交数据...
scan_module 正在载入提交数据...
sparse 正在载入提交数据...
tensor 正在载入提交数据...
tests 正在载入提交数据...
__init__.py 正在载入提交数据...
configdefaults.py 正在载入提交数据...
configparser.py 正在载入提交数据...
gradient.py 正在载入提交数据...
ifelse.py 正在载入提交数据...
printing.py 正在载入提交数据...
raise_op.py 正在载入提交数据...
updates.py 正在载入提交数据...