biapy.models.efficientnet

This module provides functionality to create and configure EfficientNet models from torchvision.models.

It allows users to instantiate various EfficientNet architectures (e.g., b0-b7), optionally load pre-trained ImageNet weights, and customize the final classification layer for specific tasks.

biapy.models.efficientnet.efficientnet(efficientnet_name, n_classes=2, load_imagenet_weights=True)[source]

Create EfficientNet.

Reference: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks.

Parameters:
  • efficientnet_name (str, optional) – Efficientnet model name to be loaded. Available options: β€œefficientnet_b[0-7]”

  • n_classes (int, optional) – Number of classes.

  • load_imagenet_weights (bool, optional) – Whether to load IMAGENET weights or not.

Returns:

model – EfficientNet model.

Return type:

Torch model