Shortcuts

获取模型权重

torchvision.models.get_model_weights(name: Union[Callable, str]) Type[WeightsEnum][source]

返回与给定模型关联的权重枚举类。

Parameters:

name (可调用的str) – 模型构建函数或其注册的名称。

Returns:

与模型关联的权重枚举类。

Return type:

weights_enum (WeightsEnum)