Ok, I feel like I understand all the loss stuff now 
I’m still confused about z though. Do I have to define a separate case for training and testing, eg
if self.training:
   z = mean + logvar*eps # (1)
else:
   z = eps

and then in the forward pass call self.decoder(z)
OR
can I just use the line marked with (1) and Pytorch will read it  as z = eps when running in .eval() mode?
Thanks a lot for your help!