data
IJEPAOutput
extends
ModelOutputIJEPAOutput(loss: Tensor, prediction: Tensor, target: Tensor, context_indices: Tensor, target_indices: Tensor)What one pretraining step produced.
Attributes
lossTensorThe discrepancy between predicted and target representations,
averaged over target blocks. Scalar.
predictionTensorWhat the predictor said,
(B, M, Nt, D).targetTensorWhat the target encoder said,
(B, M, Nt, D). Carries no
gradient.context_indicesTensorPatches the context encoder was given,
(B, Nc).target_indicesTensorPatches each target block covers,
(B, M, Nt).Examples
>>> import lucid
>>> from lucid.models.vision.ijepa import IJEPAOutput
>>> out = IJEPAOutput(
... loss=lucid.zeros(()),
... prediction=lucid.zeros(1, 4, 9, 8),
... target=lucid.zeros(1, 4, 9, 8),
... context_indices=lucid.zeros(1, 20).to(lucid.int64),
... target_indices=lucid.zeros(1, 4, 9).to(lucid.int64))
>>> out.prediction.shape
(1, 4, 9, 8)