Table Of Contents
Table Of Contents

Symbol.attr

Symbol.attr(key)[source]

Returns the attribute string for corresponding input key from the symbol.

This function only works for non-grouped symbols.

Example

>>> data = mx.sym.Variable('data', attr={'mood': 'angry'})
>>> data.attr('mood')
'angry'
Parameters:key (str) – The key corresponding to the desired attribute.
Returns:value – The desired attribute value, returns None if the attribute does not exist.
Return type:str