Does Pyro support automatic differentiation of pdf of standard distributions?


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 ?


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