Skip to content
data

InceptionV4Output

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

Structured forward output for InceptionV4ForImageClassification.

Inception-v4 trains with a single softmax head — the paper drops the auxiliary classifiers of GoogLeNet / Inception v3 — so this dataclass carries only the logits and an optional loss.

Parameters

logitsTensor
Classifier output of shape (B, num_classes).
lossTensor or None= None
Mean cross-entropy against labels when they were passed to InceptionV4ForImageClassification.forward; None otherwise.

Examples

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

Used by 1