MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / name

Method name

imperative/python/megengine/utils/network.py:705–716  ·  view source on GitHub ↗

r"""filter by node name Args: pattern(class:`str`): a string in glob syntax that can contain ``?`` and ``*`` to match a single or arbitrary characters. ignorecase(bool, optional): whether to ignroe case Returns: a new :class:`Node

(self, pattern, ignorecase=True)

Source from the content-addressed store, hash-verified

703 return self.type(Host2DeviceCopy)
704
705 def name(self, pattern, ignorecase=True):
706 r"""filter by node name
707
708 Args:
709 pattern(class:`str`): a string in glob syntax that can contain ``?`` and
710 ``*`` to match a single or arbitrary characters.
711 ignorecase(bool, optional): whether to ignroe case
712
713 Returns:
714 a new :class:`NodeFilter` object
715 """
716 return NodeFilterName(self, pattern, ignorecase)
717
718 def has_input(self, var):
719 r"""an opr is kept if it has given var as one of its inputs

Callers 2

get_opr_by_nameMethod · 0.45
get_var_by_nameMethod · 0.45

Calls 1

NodeFilterNameClass · 0.70

Tested by

no test coverage detected