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

Method _block_attr

python/paddle/base/framework.py:3945–3958  ·  view source on GitHub ↗

Get the block attribute by name. Args: name(str): the attribute name. Returns: block: the block attribute.

(self, name)

Source from the content-addressed store, hash-verified

3943 return self.desc._block_attr_id(name)
3944
3945 def _block_attr(self, name):
3946 """
3947 Get the block attribute by name.
3948
3949 Args:
3950 name(str): the attribute name.
3951
3952 Returns:
3953 block: the block attribute.
3954 """
3955
3956 id = self._block_attr_id(name)
3957 assert id >= 0 and id < len(self.block.program.blocks)
3958 return self.block.program.blocks[id]
3959
3960 def _blocks_attr(self, name):
3961 """

Callers 2

all_attrsMethod · 0.95

Calls 1

_block_attr_idMethod · 0.95

Tested by

no test coverage detected