Nope, this was the point of the PR - the only Dtype Caffe actually instantiates for caffe_vRngBernoulli is int (as Bernoulli outputs 0/1), and when you use bernoulli_distribution<int> it seems to typecast p to an int (setting the Bernoulli parameter to 0.0 for p in [0, 1)) and output all zeros (unless p==1.0).