how to clear all variables created by sample(“name”) and param(“name”) in pyro-global namespace?
To clear the parameter store, use pyro.clear_param_store()
. Unlike param
statements, however, sample statements don’t mutate any global state, so there’s nothing to clear - think of them as metadata attached to your program, like line numbers in an editor.