Categorical model with continuous dependent variable

In your setting, you are trying to find a function which map f(a) --> p, and pi(s|a) = Bernoulli(p) = Bernoulli(f(a))

In a logistic regression setting, f(a) is a logistic transformation of a linear function X*beta
In your example above, f(a) is a stochastic function that maps a exp(-l1*b) and sd into p. Since exp(-l1*b) takes a array as input, the final output p1 is also an array (1d tensor)

I hope this clear things up for you a bit.