MCPcopy Create free account
hub / github.com/PolymathicAI/AstroCLIP / mask_sequence

Method mask_sequence

astroclip/models/specformer.py:115–117  ·  view source on GitHub ↗

Mask batched sequence

(self, x: Tensor)

Source from the content-addressed store, hash-verified

113 return loss
114
115 def mask_sequence(self, x: Tensor):
116 """Mask batched sequence"""
117 return torch.stack([self._mask_seq(el) for el in x])
118
119 def preprocess(self, x):
120 std, mean = x.std(1, keepdim=True).clip_(0.2), x.mean(1, keepdim=True)

Callers 2

training_stepMethod · 0.95
validation_stepMethod · 0.95

Calls 1

_mask_seqMethod · 0.95

Tested by

no test coverage detected