ValueError: at site "N_X", invalid log_prob shape Expected [], actual [4096]

what is the shape of your data and noise['N_X']? the error is saying that you are trying to score a sample with a different shape than the distribution. i recommend stepping through a debugger, which will tell you exactly what you are passing into each distribution, making sure that your guide dist shapes match your model dist shapes and your observations are of the correct shape using to_event as necessary.