I had no error before, but after recent update I got an error when run ss_vae_M2.py as:
$ python ss_vae_M2.py -enum
Traceback (most recent call last):
File "ss_vae_M2.py", line 464, in <module>
run_inference_ss_vae(args)
File "ss_vae_M2.py", line 371, in run_inference_ss_vae
run_inference_for_epoch(data_loaders, losses, periodic_interval_batches)
File "ss_vae_M2.py", line 268, in run_inference_for_epoch
new_loss = losses[loss_id].step(xs)
File "/home/jbaik/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pyro_ppl-0.1.2-py3.6.egg/pyro/infer/svi.py", line 98, in step
loss = self.loss_and_grads(self.model, self.guide, *args, **kwargs)
File "/home/jbaik/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pyro_ppl-0.1.2-py3.6.egg/pyro/infer/elbo.py", line 65, in loss_and_grads
return self.which_elbo.loss_and_grads(model, guide, *args, **kwargs)
File "/home/jbaik/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pyro_ppl-0.1.2-py3.6.egg/pyro/infer/trace_elbo.py", line 146, in loss_and_grads
for weight, model_trace, guide_trace, log_r in self._get_traces(model, guide, *args, **kwargs):
File "/home/jbaik/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pyro_ppl-0.1.2-py3.6.egg/pyro/infer/trace_elbo.py", line 79, in _get_traces
check_enum_discrete_can_run(model_trace, guide_trace)
File "/home/jbaik/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pyro_ppl-0.1.2-py3.6.egg/pyro/infer/trace_elbo.py", line 45, in check_enum_discrete_can_run
for shape, (source, name) in sorted(shapes.items())])))
NotImplementedError: enum_discrete does not support mixture of batched and un-batched variables. Try rewriting your model to avoid batching or running with enum_discrete=False. Found the following variables of different batch shapes:
guide y: shape = (200,)
guide z: shape = (200, 50)
model x: shape = (200, 784)
Hi,
I had no error before, but after recent update I got an error when run ss_vae_M2.py as:
with
-enumoption. What to do to avoid this?