data
VJEPAOutput
extends
ModelOutputVJEPAOutput(loss: Tensor, short_prediction: Tensor, short_target: Tensor, long_prediction: Tensor, long_target: Tensor, short_context: Tensor, short_targets: Tensor, long_context: Tensor, long_targets: Tensor)What one pretraining step produced, for both mask collections.
Attributes
lossTensorThe two collections' discrepancies, averaged. Scalar.
short_prediction, short_targetTensorWhat the predictor said and what the target encoder said for the
eight-block collection,
(B, Ns, D).long_prediction, long_targetTensorThe same for the two-block collection,
(B, Nl, D).short_context, short_targetsTensorThe tubelets the encoder read and the ones it answered for,
(B, Cs) and (B, Ns).long_context, long_targetsTensorThe same for the second collection.
Examples
>>> import lucid
>>> from lucid.models.vision.vjepa import VJEPAOutput
>>> zero = lucid.zeros(1, 4, 8)
>>> index = lucid.zeros(1, 4).to(lucid.int64)
>>> out = VJEPAOutput(
... loss=lucid.zeros(()), short_prediction=zero, short_target=zero,
... long_prediction=zero, long_target=zero, short_context=index,
... short_targets=index, long_context=index, long_targets=index)
>>> out.short_prediction.shape
(1, 4, 8)Used by 1
Constructors
1dunder
__init__
→None__init__(loss: Tensor, short_prediction: Tensor, short_target: Tensor, long_prediction: Tensor, long_target: Tensor, short_context: Tensor, short_targets: Tensor, long_context: Tensor, long_targets: Tensor)Build the three networks. See the class docstring for parameters.