data
InceptionV3Output
InceptionV3Output(logits: Tensor, aux_logits: Tensor | None = None, loss: Tensor | None = None)Structured forward output for InceptionV3ForImageClassification.
Carries the main classifier logits and the optional auxiliary
classifier logits emitted during training only. The auxiliary head
in Inception v3 attaches after the last 17x17 stage
(inception_c3 / Mixed_6e in the paper diagram) and is only
active when both config.aux_logits=True and the model is in
training mode.
Parameters
logitsTensorMain classifier output of shape
(B, num_classes).Logits from the auxiliary classifier of shape
(B, num_classes); None at inference or when
aux_logits=False.Cross-entropy loss with auxiliary term (weight 0.4) when labels
were passed to
forward; None otherwise.Notes
From Szegedy et al., "Rethinking the Inception Architecture for Computer Vision", CVPR 2016, §6. Training loss with the auxiliary head is
Examples
>>> import lucid
>>> from lucid.models.vision.inception import inception_v3_cls
>>> model = inception_v3_cls(aux_logits=True).eval()
>>> x = lucid.randn(1, 3, 299, 299)
>>> out = model(x)
>>> out.aux_logits is None # inactive at eval
True