Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions claymodel/finetune/embedder/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def add_encodings(self, patches, time, latlon, gsd):
def forward(self, datacube):
cube, time, latlon, gsd, waves = (
datacube["pixels"], # [B C H W]
datacube["time"], # [B 2]
datacube["latlon"], # [B 2]
datacube["time"], # [B 4] # week_sin, week_cos, hour_sin, hour_cos
datacube["latlon"], # [B 4] # lat_sin, lat_cos, lon_sin, lon_cos
datacube["gsd"], # 1
datacube["waves"], # [N]
) # [B C H W]
Expand Down
4 changes: 2 additions & 2 deletions claymodel/finetune/regression/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def forward(self, datacube):
"""
cube, time, latlon, gsd, waves = (
datacube["pixels"], # [B C H W]
datacube["time"], # [B 2]
datacube["latlon"], # [B 2]
datacube["time"], # [B 4] # week_sin, week_cos, hour_sin, hour_cos
datacube["latlon"], # [B 4] # lat_sin, lat_cos, lon_sin, lon_cos
datacube["gsd"], # 1
datacube["waves"], # [N]
)
Expand Down
4 changes: 2 additions & 2 deletions claymodel/finetune/segment/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def forward(self, datacube):
"""
cube, time, latlon, gsd, waves = (
datacube["pixels"], # [B C H W]
datacube["time"], # [B 2]
datacube["latlon"], # [B 2]
datacube["time"], # [B 4] # week_sin, week_cos, hour_sin, hour_cos
datacube["latlon"], # [B 4] # lat_sin, lat_cos, lon_sin, lon_cos
datacube["gsd"], # 1
datacube["waves"], # [N]
)
Expand Down
4 changes: 2 additions & 2 deletions claymodel/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ def mask_out(self, patches):
def forward(self, datacube):
cube, time, latlon, gsd, waves = (
datacube["pixels"], # [B C H W]
datacube["time"], # [B 2]
datacube["latlon"], # [B 2]
datacube["time"], # [B 4] # week_sin, week_cos, hour_sin, hour_cos
datacube["latlon"], # [B 4] # lat_sin, lat_cos, lon_sin, lon_cos
datacube["gsd"], # 1
datacube["waves"], # [N]
) # [B C H W]
Expand Down
2 changes: 1 addition & 1 deletion docs/references.bib
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
% This file contains bibliography references for the Clay Foundation Model documentation
% Currently empty but required by the Jupyter Book configuration
% Currently empty but required by the Jupyter Book configuration
4 changes: 2 additions & 2 deletions docs/tutorials/wall-to-wall.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,12 @@
"datacube = {\n",
" \"platform\": platform,\n",
" \"time\": torch.tensor(\n",
" np.hstack((week_norm, hour_norm)),\n",
" np.column_stack((week_norm, hour_norm)),\n",
" dtype=torch.float32,\n",
" device=device,\n",
" ),\n",
" \"latlon\": torch.tensor(\n",
" np.hstack((lat_norm, lon_norm)), dtype=torch.float32, device=device\n",
" np.column_stack((lat_norm, lon_norm)), dtype=torch.float32, device=device\n",
" ),\n",
" \"pixels\": pixels.to(device),\n",
" \"gsd\": torch.tensor(stack.gsd.values, device=device),\n",
Expand Down