Is it possible to have a normalizing flow as a latent parameter in a model in Pyro? For example, if I’m trying to model an effect that is spatially-varying, is it possible to express this as a normalizing flow? For example, schematically:

NF = transformed_dist(N([0,0], [1,1]), spline)

beta ~ NF

y = N(mu + beta, sigma)

Or can the NF only be used for observed variables?