MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / attr

Method attr

python/paddle/base/framework.py:3920–3931  ·  view source on GitHub ↗

Get the attribute by name. Args: name(str): the attribute name. Returns: bool|int|str|float|list: The attribute value. The return value can be any valid attribute type.

(self, name)

Source from the content-addressed store, hash-verified

3918 return self.desc.attr_names(True)
3919
3920 def attr(self, name):
3921 """
3922 Get the attribute by name.
3923
3924 Args:
3925 name(str): the attribute name.
3926
3927 Returns:
3928 bool|int|str|float|list: The attribute value. The return value
3929 can be any valid attribute type.
3930 """
3931 return self.desc.attr(name)
3932
3933 def _block_attr_id(self, name):
3934 """

Callers 2

_lowerFunction · 0.95
all_attrsMethod · 0.95

Calls 1

attrMethod · 0.45

Tested by

no test coverage detected