Add Tessera#671
Conversation
|
@claude can you review this PR? |
|
Claude finished @favyen2's task in 2m 46s —— View job PR Review: Add Tessera
Overall this is a clean, well-structured implementation. The architecture faithfully mirrors Tessera v1.1 upstream, the tests are solid, and the docs are thorough. I found a few issues worth addressing before merging. Issues1. S1 observations are not sorted by day-of-year (potential correctness bug)
s1_seq = torch.cat(
[
self._build_sequence(s1a_image, s1a_doys, num_pixels), # asc DOYs
self._build_sequence(s1d_image, s1d_doys, num_pixels), # desc DOYs
],
dim=1,
)The S2 sequence has no such issue since it's a single modality. Worth verifying against the upstream training code whether merged S1 observations were sorted. Fix this → 2. Dead condition in
for name, param in self.named_parameters():
if "weight" in name or name.startswith("W_"):
3.
def forward(self, doy: torch.Tensor) -> torch.Tensor:
...
div_term = torch.exp(
torch.arange(0, self.d_model, 2, dtype=torch.float)
* -(math.log(10000.0) / self.d_model)
).to(doy.device)This allocates and computes the frequency terms on every call. Pre-computing and registering as a buffer in 4.
import warnings
warnings.warn(
"The data_source argument to Tessera is deprecated and has no effect; "
"set data_source in TesseraNormalize instead.",
DeprecationWarning,
stacklevel=2,
)Minor NotesDocs: S2 band list in JSON example includes extra bands —
Positives
|
No description provided.