core.Operator should be removed
Created by: tonyyang-svail
We have a python API core.Operator
to instantiate an operator on the python end.
https://github.com/PaddlePaddle/Paddle/blob/d3162339f6637114d515b4bc448fe4ae8cc81125/paddle/fluid/pybind/pybind.cc#L332-L368
We used it in our old version of op_test.py
. Since op_test.py
has been reimplemented to be executor based 6 months ago, I feel we would like to remove it.
One major blocker of the removal the test of batch_norm:
λ 87acf7e45c5c /paddle/python/paddle/v2/fluid {remove_backward_cc} grep -rI "core.Operator" .
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
./op.py: return core.Operator.create(opdesc.SerializeToString())
./tests/unittests/test_batch_norm_op.py: backward_op = core.Operator.backward(op, no_grad_set)
./tests/unittests/test_layer_norm_op.py: backward_op = core.Operator.backward(op, no_grad_set)
The latest modification of these two tests is one month ago by @chengduoZH. Is this core.Operator
intentional?