list_models¶ torchvision.models.list_models(module: Optional[module] = None, include: Optional[Union[Iterable[str], str]] = None, exclude: Optional[Union[Iterable[str],str]] = None) → List[str][源码]¶ 返回注册模型的名称列表。 参数: module (ModuleType, 可选) – 希望从中提取可用模型的模块。 include (str 或 Iterable[str], 可选) – 用于从所有模型集合中包含模型的过滤器。过滤器会被传递给 fnmatch 以匹配 Unix shell 风格的通配符。如果存在多个过滤器,结果将是单个过滤器的并集。 exclude (str 或 Iterable[str], 可选) – 在 include_filters 之后应用的过滤器,用于移除模型。过滤器会被传递给 fnmatch 以匹配 Unix shell 风格的通配符。如果存在多个过滤器,结果将是移除所有匹配任一单个过滤器的模型。 返回值: 可用模型的名称列表。 返回类型: models (list)