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

Npm1 64 res #77

Merged
merged 6 commits into from
Dec 13, 2024
Merged

Npm1 64 res #77

merged 6 commits into from
Dec 13, 2024

Conversation

ritvikvasan
Copy link
Collaborator

@ritvikvasan ritvikvasan commented Dec 10, 2024

This PR fixes issue #73 and adds configs for npm1 64 resolution models. All preprocessed data for this currently lives here
/allen/aics/modeling/ritvik/projects/latest_clones/benchmarking_representations/morphology_appropriate_representation_learning/preprocessed_data/npm1_64_res

and will eventually be moved to AWS.

This checks that the following run successfully

python src/br/analysis/run_features.py --save_path "./outputs_npm1/" --embeddings_path "./morphology_appropriate_representation_learning/model_embeddings/npm1" --sdf True --dataset_name "npm1" --debug False

python src/br/analysis/run_features.py --save_path "./outputs_other_polymorphic/" --embeddings_path "./morphology_appropriate_representation_learning/model_embeddings/other_polymorphic" --sdf True --dataset_name "other_polymorphic" --debug False

python src/br/analysis/run_features.py --save_path "./outputs_npm1_64_res/" --embeddings_path "./morphology_appropriate_representation_learning/model_embeddings/npm1_64_res" --sdf True --dataset_name "npm1_64_res" --debug False

@ritvikvasan ritvikvasan requested a review from fatwir December 11, 2024 18:36
Copy link
Collaborator

@pgarrison pgarrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Comment on lines +479 to +482
np.linalg.norm(intermediate_embed, axis=-1)
)
else:
intermediate_embed = intermediate_embed[:, 1:, :].mean(axis=1)
intermediate_embed = np.linalg.norm(intermediate_embed, axis=-1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a substantive change? Can you give more context?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this -> intermediate_embed[:, 1:, :].mean(axis=1) was specifically for MAE features (batch X tokens X features). The output of that model has the class token as the first dimension, and so we take the mean across every dimension except the first.

this -> np.linalg.norm(intermediate_embed, axis=-1) is for vector neuron features (rotation equivariant point cloud encoder outputs - batch x feature x 3). Its a vector output so we take the vector norms to get the features.

We dont really use MAE in most of the paper analysis, so this is removed currently

@ritvikvasan ritvikvasan merged commit 6f43518 into main Dec 13, 2024
1 check passed
@ritvikvasan ritvikvasan deleted the npm1_64_res branch December 13, 2024 06:12
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.

2 participants