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] [source]¶
傳回已註冊模型的名稱清單。
- 參數:
module (ModuleType, optional) – 我們要從中提取可用模型的模組。
include (str 或 Iterable[str], optional) – 用於從所有模型集合中包含模型的篩選器。 篩選器會傳遞給 fnmatch 以符合 Unix shell 風格的萬用字元。 在多個篩選器的情況下,結果是個別篩選器的聯集。
exclude (str 或 Iterable[str], optional) – 在 include_filters 之後套用以移除模型的篩選器。 篩選器會傳遞給 fnmatch 以符合 Unix shell 風格的萬用字元。 在多個篩選器的情況下,結果是移除所有符合任何個別篩選器的模型。
- 傳回:
包含可用模型名稱的清單。
- 傳回類型:
models (list)