Rewrite sparse_softmax_cross_entropy and reduce ops gradient funcs (#4823)
* Rewrite sparse softmax cross entropy gradient func.
* Rewrite reduce ops gradient funcs.
* Add crossentropyloss grad unittest.
Co-authored-by:
oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com>
Co-authored-by: hjchen2 <hjchen2>
Showing
- oneflow/core/autograd/gradient_funcs/reduce_ops.cpp 155 additions, 0 deletionsoneflow/core/autograd/gradient_funcs/reduce_ops.cpp
- oneflow/core/autograd/gradient_funcs/sparse_softmax_cross_entropy.cpp 85 additions, 0 deletions.../autograd/gradient_funcs/sparse_softmax_cross_entropy.cpp
- oneflow/core/framework/op_expr_helper.cpp 52 additions, 0 deletionsoneflow/core/framework/op_expr_helper.cpp
- oneflow/core/framework/op_expr_helper.h 16 additions, 0 deletionsoneflow/core/framework/op_expr_helper.h
- oneflow/python/test/modules/test_crossentropyloss_grad.py 153 additions, 0 deletionsoneflow/python/test/modules/test_crossentropyloss_grad.py
Please register or sign in to comment