brain-score / model-tools

Helper functions to extract model activations and translate from Machine Learning to Neuroscience
MIT License
8 stars 27 forks source link

Transfer stimuli degrees #27

Closed tiagogmarques closed 4 years ago

tiagogmarques commented 4 years ago

Allows pytorch models load_preprocess_images to accept normalizations other than the default. Corrects bug that was crashing models' behavioral layers.

tiagogmarques commented 4 years ago

Fine by me.

On Feb 21, 2020, at 11:57 AM, Martin Schrimpf notifications@github.com wrote:

@mschrimpf commented on this pull request.

In model_tools/brain_transformation/behavior.py https://github.com/brain-score/model-tools/pull/27#discussion_r382694838:

-

  • fitting_features = self.activations_model(fitting_stimuli, layers=[self.layer])
  • if type(self.layer) is not list:
  • layers = [self.layer]
  • else:
  • layers = self.layer
  • fitting_features = self.activations_model(fitting_stimuli, layers=layers) Current models did not fail because of this, but I understand the confusion from calling it layer and then actually requiring a list. Checking for a list type is unstable though, what about e.g. tuples or other iterables? I'd rather not allow multiple ways to achieve the same thing, and instead make the docs more clear that the passed layer should be a list.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brain-score/model-tools/pull/27?email_source=notifications&email_token=AF5XARPA27GSOOBCM33JI33REABXNA5CNFSM4KXH2NS2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCWPYDBQ#pullrequestreview-362774918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5XARIZRAVC3Y4CFWEJT5DREABXNANCNFSM4KXH2NSQ.