mbi2gs / gflownet_tf2

Generative Flow Network demo in Tensorflow2
MIT License
8 stars 5 forks source link

Mixing with uniform distribution results probability distribution greater then 1 #4

Closed igaloly closed 2 years ago

igaloly commented 2 years ago

In sample_trajectories, in the explore phase, after the mixing of model_fwrd_probs with uniform distribution, the sum of probabilities of the resulting model_fwrd_probs is greater than one. Is it intended? If so, what's the logic behind it? I see that mask_and_norm_forward_actions normalizes them back to one. But why do they happen to be un-normalized?

mbi2gs commented 2 years ago

It's because of small numerical errors that arise from converting the logits to probabilities. So, model_fwrd_probs sums to ~1, but not exactly.