How to move parameters in auto guide to cuda


#1

I defined a class network with model and auto guide inside the class. after initialise the class, I set class.cuda() to move all parameters to the cuda.

if I code the guide by myself, everything just works fine. but when I use auto guide, it has error input is cuda.float but the weights torch.float.

except set torch.set_default_tensor_type(‘torch.cuda.FloatTensor’), is there any other way to set auto guide on cuda properly


#2

@yikuanlee_pyro It seems that you have to call some pyro.param("auto_loc", init_cuda_tensor) before beginning inference. Please see the docs.