Difficulty calculating model gradients, shared variables with static values, and sparse matrices

Thank you @junpenglao and @lucianopaz for the replies!

I updated the notebooks to use saved npy files of the arrays produced by gridding, so there’s no dependency. The updated notebook “Vis2DPyMC3” and npy save files are in this directory here: https://github.com/iancze/million-points-of-light/tree/master/notebooks . The gridding file is also in the directory above that if you’re curious.

As far as the shape goes, I think that interp_real, interp_image, noise, real_data, and imag_data are all 1D vectors of length N_vis, which is 100 (confirmed via tt.printing statements). Note that I can actually get the sampler to run a few test samples with Metropolis Hastings, it’s when the calculation of the gradients are required that things start to go awry.

Thanks for your help!