I want to get mxnet function decorators in python. I can get the decorators for Tensorflow as follows:
Given that we have the following tensorflow API:
tf.math.floor(2.5)
When I run the code, the function arguments are set inside tensorflow object.
APIname = "tf.math.floor"
apit_split = APIname.split('.')
func_name = apit_split[-1]
module_obj = tf
if len(func_name_list) > 1:
for module_name in apit_split[:-1]:
module_obj = getattr(module_obj, module_name)
myfunction = getattr(module_obj, func_name)
And the output is:
As you can see, I have the decorators for the function. Now for mxnet, I have the following code snippet:
Given that we have the following mxnet API:
from mxnet import ndarray
x = ndarray.ones((2,3))
When I run the code, the function arguments are set inside ndarray object.
APIname = "ndarray.ones"
apit_split = APIname.split('.')
func_name = apit_split[-1]
module_obj = ndarray
if len(func_name_list) > 1:
for module_name in apit_split[:-1]:
module_obj = getattr(module_obj, module_name)
myfunction = getattr(module_obj, func_name)
The output is:
As you can see, there is no decorator for the function. Any idea? thanks.