Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Clay forward signature to work with tasks #258

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fmartiescofet
Copy link
Contributor

@fmartiescofet fmartiescofet commented Nov 26, 2024

All tasks assume the batch returned by the dataloader is a dictionary with an "image" key, the corresponding y label (either "mask" or "label") and the rest of elements of the dictionary are passed as keyword arguments to the model, see an example here.
For this reason, it was not possible to pass the metadata to Clay using a dictionary (which is what Clay expected).

This PR modifies Clay to accept the metadata as keyword arguments instead of a dict and the Embedder constructs the dictionary using a Datacuber.

It also fixes a computation of the positional embedding when a device different than cpu is used.

Signed-off-by: Francesc Marti Escofet <[email protected]>
Signed-off-by: Francesc Marti Escofet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant