Skip to content
data

InceptionResNetOutput

extendsImageClassificationOutput
InceptionResNetOutput(logits: Tensor, loss: Tensor | None = None, hidden_states: tuple[Tensor, ...] | None = None, attentions: tuple[Tensor, ...] | None = None)

Structured forward output for InceptionResNetV2ForImageClassification.

Inception-ResNet v2 does not use auxiliary classifiers (unlike Inception v3 / GoogLeNet) — the residual shortcuts already mitigate the vanishing-gradient problem that auxiliary heads were originally introduced to address — so this dataclass only carries the main logits and an optional loss tensor.

Parameters

logitsTensor
Main classifier output of shape (B, num_classes).
lossTensor or None= None
Cross-entropy loss when labels were passed to forward; None otherwise.

Examples

>>> import lucid
>>> from lucid.models.vision.inception_resnet import inception_resnet_v2_cls
>>> model = inception_resnet_v2_cls().eval()
>>> x = lucid.randn(1, 3, 299, 299)
>>> out = model(x)
>>> out.logits.shape
(1, 1000)
>>> out.loss is None
True

Used by 1