Skip to content
Open
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/callbacks_wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def on_validation_end(
batch["pixels"][j + n_cols][0],
cmap="viridis",
)
axs[2, j].set_title(f"Actual {j+n_cols}")
axs[2, j].set_title(f"Actual {j + n_cols}")
axs[2, j].axis("off")

# Plot predicted images in rows 1 and 3
Expand All @@ -274,7 +274,7 @@ def on_validation_end(
axs[1, j].axis("off")

axs[3, j].imshow(pixels[j + n_cols][0], cmap="viridis")
axs[3, j].set_title(f"Pred {j+n_cols}")
axs[3, j].set_title(f"Pred {j + n_cols}")
axs[3, j].axis("off")

self.logger.experiment.log({f"{platform}": wandb.Image(fig)})
Expand Down
6 changes: 3 additions & 3 deletions claymodel/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def posemb_sincos_2d_with_gsd(


def posemb_sincos_1d(waves, dim, temperature: int = 10000, dtype=torch.float32):
assert (
dim % 2 == 0
), "Feature dimension must be a multiple of 2 for sincos embedding"
assert dim % 2 == 0, (
"Feature dimension must be a multiple of 2 for sincos embedding"
)
waves = torch.arange(waves) if isinstance(waves, int) else waves

omega = torch.arange(dim // 2, device=waves.device) / (dim // 2 - 1)
Expand Down
2 changes: 1 addition & 1 deletion docs/clay-v0/clay-v0-location-embeddings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
"plt.scatter(latlon[:, 0], latlon[:, 1], c=latlon[:, 2], label=\"Actual\", alpha=0.3)\n",
"\n",
"for i in range(100):\n",
" txt = f\"{latlon[:,0][i]:.2f},{latlon[:, 1][i]:.2f}\"\n",
" txt = f\"{latlon[:, 0][i]:.2f},{latlon[:, 1][i]:.2f}\"\n",
" plt.annotate(txt, (latlon[:, 0][i] + 1e-5, latlon[:, 1][i] + 1e-5))"
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/finetune/classify.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We have built an example for training a classification head on top of
the class token embeddings from the frozen Clay encoder.

All the code for this example can be found in the
[classify finetuning folder](https://github.com/Clay-foundation/model/blob/main/finetune/classify)
[classify finetuning folder](https://github.com/Clay-foundation/model/blob/main/claymodel/finetune/classify)
of this repository.

## Classifier
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
2 changes: 1 addition & 1 deletion docs/tutorials/inference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"items = catalog.search(\n",
" collections=[PLATFORM_NAME],\n",
" bbox=[-122.6, 37.6, -122.35, 37.85],\n",
" datetime=f\"{YEAR}-01-01T00:00:00Z/{YEAR+1}-01-01T00:00:00Z\",\n",
" datetime=f\"{YEAR}-01-01T00:00:00Z/{YEAR + 1}-01-01T00:00:00Z\",\n",
" max_items=100,\n",
")\n",
"\n",
Expand Down