Shortcuts

get_model

torchvision.models.get_model(name: str, **config: Any) Module[source]

Gets the model name and configuration and returns an instantiated model.

Parameters:
  • name (str) – The name under which the model is registered.

  • **config (Any) – parameters passed to the model builder method.

Returns:

The initialized model.

Return type:

model (nn.Module)

Examples using get_model:

Transforms v2: End-to-end object detection/segmentation example

Transforms v2: End-to-end object detection/segmentation example

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources