Forward-return dataclass for XceptionForImageClassification.
Carries the per-class logits and the optional supervised loss
computed when training labels are supplied to forward.
Attributes
logitsTensorPre-softmax classification scores of shape
(batch_size, num_classes). Apply lucid.softmax or
lucid.argmax to convert to probabilities or hard
predictions.lossTensor or None, optional, default=NoneScalar cross-entropy loss; present only when
labels were
passed to the forward call. None during inference.Notes
Returned by XceptionForImageClassification.forward so the
public API stays decoupled from raw tensor tuples — callers can
address fields by name (out.logits) and ignore irrelevant
entries.
Examples
>>> import lucid
>>> from lucid.models.vision.xception import xception_cls
>>> model = xception_cls()
>>> x = lucid.randn(2, 3, 299, 299)
>>> out = model(x)
>>> out.logits.shape
(2, 1000)
>>> out.loss is None
True