Replies: 2 comments 2 replies
-
Hi - thanks for the question! Since this is pretty specific to flax, you may have more luck at https://github.com/google/flax/discussions/ The answer to why this is not working is that |
Beta Was this translation helpful? Give feedback.
-
Hey @imi-hub, if all models have the same form you can use nn.vmap to create an ensamble. If you want all instance to receive the same data but have different weights set |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a list of models which I would like to apply the same batch of inputs.
Instead of using a for loop to go through the models in the list I was wondering if it is possible to parallelize the application of models onto the inputs with vmap.
Similar issue:
#673
I share a simple example below:
Below is the attempt with a for loop, which works fine, but it is slow (for more complex models with larger amount of parameters...)
1st attempt
Below I share my first attempt to vmap the model of models to the inputs:
which gives me the following error:
2nd attempt
And below is a second attempt:
with following error:
Beta Was this translation helpful? Give feedback.
All reactions