nimashiri opened a new issue, #21150:
URL: https://github.com/apache/mxnet/issues/21150

   ## Description
   
   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:
   
   
![deco](https://user-images.githubusercontent.com/17060581/204193845-3f94fcc7-6c60-4e9d-9a58-a4699cfb1ae1.png)
   
   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:
   
   
![decomx](https://user-images.githubusercontent.com/17060581/204193935-f995bce3-838d-43c8-bd80-f696389c2a60.png)
   
   As you can see, there is no decorator for the function. Any idea? thanks.
   
   ## References
   https://fossies.org/linux/tensorflow/tensorflow/python/util/tf_decorator.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to