Is there a way to run predict() for the same batch of data on two different sets of weights (same model architecture)
Yes, there's a way to do this by creating multiple instances of a model's architecture and loading different weights for each instance. Then, you can use pridict() method for each of these different instances of the original model for the same batch of data. @ManishSharma1609 each predict would be a separate set of calculations that needs to be run sequentially no? My issue here is that I want the computations to be run in parallel.

It *should* be possible as what I am asking about is essentially just one network with the two (or more) networks for nodes being complete separate and only sharing input nodes (think how nodes within CNN are not all connected). @ben-arnao I understand, but i guess predict() method doesn't provide parallelism and to run the computations in parallel we have to use modules like multiprocessing or concurrent.futures or threading libraries. They are very short predictions, loading data into GPU then offloading takes away the benefit of multiprocessing from the tests I've ran, that's why I wanted a more native solution. Since the dimensions are the same and models like a CNN already skip connections it should be possible. @ben-arnao Sorry for the late response!
There are two ways to run predict() for the same batch of data on two different sets of weights (same model architecture):

Firstly, you could create multiple instances of the model's architecture and load different weights for each instance. Then, you can use the predict() method for each of these different instances of the original model for the same batch of data. 

Secondly, you can use the set_weights() method to set the weights of the model to the desired set of weights. Then, you can use the predict() method as usual. 

For any further queries on this please post this issue on TF [Forum](https://discuss.tensorflow.org/) where there is a larger community to get you the right help. Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62094">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62094">No</a>
 > @ben-arnao Sorry for the late response! There are two ways to run predict() for the same batch of data on two different sets of weights (same model architecture):
> 
> Firstly, you could create multiple instances of the model's architecture and load different weights for each instance. Then, you can use the predict() method for each of these different instances of the original model for the same batch of data.
> 
> Secondly, you can use the set_weights() method to set the weights of the model to the desired set of weights. Then, you can use the predict() method as usual.
> 
> For any further queries on this please post this issue on TF [Forum](https://discuss.tensorflow.org/) where there is a larger community to get you the right help. Thank you!

Hi, thanks for the response. I am more asking if there is a way to parallelize the evaluation of different sets of weights. I have been trying to find something to fit my use case but it seems to be unique.
### Issue type

Support

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

n/a

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

Hi all, sorry If not the write forum to ask such a question, but I am wondering about functionality of TensorFlow.

Basically I want to run the same batch of data, through X different models. These models will have a different set of weights, but are architecturally the same model.

From a technical perspective, I don't see why it is not possible to do in a single set of computations. In practice, it not different than two submodels that share inputs nodes, but the nodes after are just not connected at all, you would have two output nodes (one of each sub-model).

### Standalone code to reproduce the issue

```shell
n/a
```


### Relevant log output

_No response_