alexnet¶
The alexnet provides a convenient way to create an instance of the AlexNet module, a convolutional neural network designed for image classification tasks.
Total Parameters: 61,100,840
Function Signature¶
@register_model
def alexnet(num_classes: int = 1000, **kwargs) -> AlexNet
Parameters¶
num_classes (int, optional): The number of output classes for classification. Default is 1000.
kwargs (dict, optional): Additional keyword arguments to customize the AlexNet module.
Returns¶
AlexNet: An instance of the AlexNet module configured with the specified number of classes and any additional arguments.
Examples¶
Creating a Default AlexNet Model
import lucid.models as models
# Create an AlexNet model with 1000 output classes
model = models.alexnet()
print(model) # Displays the AlexNet architecture
Custom Number of Classes
# Create an AlexNet model with 10 output classes
model = models.alexnet(num_classes=10)
print(model) # Displays the AlexNet architecture with modified output