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

fix slow concat #71

Open YingtianDt opened 1 year ago

YingtianDt commented 1 year ago

In the original activations/core.py: ActivationsHelper._get_activations_batched, the np.concatenate for accumulating output features will drastically slow down the program (as the accumulated result becomes larger). Now I fix it by simply using list to keep track of all outputs and concatenate them at the very end.