MCPcopy Create free account
hub / github.com/coperception/star / forward

Method forward

star/models/mae_base.py:742–750  ·  view source on GitHub ↗
(self, imgs1, imgs2, mask_ratio=0.75)

Source from the content-addressed store, hash-verified

740 return loss
741
742 def forward(self, imgs1, imgs2, mask_ratio=0.75):
743 latent, mask1, ids_restore, size1 = self.forward_encoder(imgs1, imgs2, mask_ratio)
744 # now we only consider reconstruct the first frame
745 # this can be extended to reconstruct both
746 latent_to_decode = latent[:, :1+size1, :]
747 pred = self.forward_decoder(latent_to_decode, ids_restore) # [N, L, p*p*3]
748 loss = self.forward_loss(imgs1, pred, mask1)
749 result = self.unpatchify(pred)
750 return loss, pred, mask1, result

Callers

nothing calls this directly

Calls 4

forward_encoderMethod · 0.95
forward_decoderMethod · 0.95
forward_lossMethod · 0.95
unpatchifyMethod · 0.95

Tested by

no test coverage detected