Does Pyro support automatic differentiation of pdf of standard distributions?


#1

I would like to include a term with beta variable like:

Beta(Variable(torch.FloatTensor([alpha]).cuda()), Variable(torch.FloatTensor([beta]).cuda()), batch_size=bs).batch_log_pdf(X).exp()

in my loss function. Does Pyro support auto-differentiation of PyTorch variables created from log pdf of distributions provided by Pyro ?


#2

Yes, the .log_pdf() return value is differentiable. We use this fact throughout Pyro inference algorithms.