megengine.utils.network.NodeFilterType.name

NodeFilterType.name(pattern, ignorecase=True)

通过节点名称过滤。

参数
  • pattern(classstr): a string in glob syntax that can contain ? and * to match a single or arbitrary characters.

  • ignorecase (bool, optional) – 是否忽略大小写。

返回

返回一个新的 NodeFilter 对象,该对象将在迭代时检查类型,不满足要求则报错。