Don't map operator name to Python functions
Created by: wangkuiyi
def __bootstrap__():
"""
Bootstrap function for this module. It will dynamic create all op creation
methods in runtime.
"""
for op_proto in get_all_op_protos():
func = create_op_creation_method(op_proto)
func.__name__ = str(op_proto.type)
setattr(op_creations, func.__name__, func)
This introduces extra complexity compared with
core.operator("ReLU", input={...}, output={...})
The former approach would create confusion for our users -- users might see a call in an example program like fc(...)
but s/he cannot grep the codebase to find the definition of function fc
.