A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://huggingface.co/docs/transformers/v4.51.3/en/main_classes/backbones below:

Website Navigation


Backbone

Backbone

A backbone is a model used for feature extraction for higher level computer vision tasks such as object detection and image classification. Transformers provides an AutoBackbone class for initializing a Transformers backbone from pretrained model weights, and two utility classes:

timm models are loaded with the TimmBackbone and TimmBackboneConfig classes.

Backbones are supported for the following models:

AutoBackbone class transformers.AutoBackbone < source >

( *args **kwargs )

BackboneMixin class transformers.utils.BackboneMixin < source >

( )

Serializes this instance to a Python dictionary. Override the default to_dict() from PretrainedConfig to include the out_features and out_indices attributes.

BackboneConfigMixin class transformers.utils.BackboneConfigMixin < source >

( )

A Mixin to support handling the out_features and out_indices attributes for the backbone configurations.

Serializes this instance to a Python dictionary. Override the default to_dict() from PretrainedConfig to include the out_features and out_indices attributes.

TimmBackbone class transformers.TimmBackbone < source >

( config **kwargs )

Wrapper class for timm models to be used as backbones. This enables using the timm models interchangeably with the other models in the library keeping the same API.

TimmBackboneConfig class transformers.TimmBackboneConfig < source >

( backbone = None num_channels = 3 features_only = True use_pretrained_backbone = True out_indices = None freeze_batch_norm_2d = False **kwargs )

Parameters

This is the configuration class to store the configuration for a timm backbone TimmBackbone.

It is used to instantiate a timm backbone model according to the specified arguments, defining the model.

Configuration objects inherit from PretrainedConfig and can be used to control the model outputs. Read the documentation from PretrainedConfig for more information.

Example:

>>> from transformers import TimmBackboneConfig, TimmBackbone

>>> 
>>> configuration = TimmBackboneConfig("resnet50")

>>> 
>>> model = TimmBackbone(configuration)

>>> 
>>> configuration = model.config
< > Update on GitHub

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3