Hey guys! I have question regarding sampling from a categorical distribution. In pyro/pytorch, for a three event scenario, the categorical distribution returns 0,1 and 2 as the samples values from the distribution. However, I want to generate -1,0,1 to be generated behind the scenes and applied to a neural network
In the model and the guide function, the sampling itself takes place behind the scenes. For a quick look, consider the following image. The python dictionary contains instances of the distribution classes.
Let the dictionary contain instances of the categorical class. The command lifted_reg_model=lifted_module() samples the weight and bias values from the categorical distribution and applies them to a neural network. So by default these values will be 0,1,2. But how can I make the change to -1,0,1 ? doing 1-pyro.sample(…) returns tensor but not a class instance corresponding to samples -1,0,1
cate.JPG1543×211 40.6 KB