I’m trying to run multiple guides with different initialization (random) using a for loop. But it seems the initial value is same each time guide is called. How to I rectify this?
What’s your use case for running multiple guides? This will not work because param values have a global scope. The first time pyro.param('var_mu_1', ...) is called, it registers an initial value in the global parameter store keyed by the name ‘var_mu_1’. The next time this statement is called, it will simply return the value from the the param store (without re-initializing). As @jpchen suggested, you could just call pyro.clear_param_store() after training each guide and retrieving the results before starting to train another one in a loop.