Dear author, sorry for bothering you again.
When I use optimizer 'afl', I notice the function 'flearn.utils.model_utils.project' sometimes returns a result not in the probability simplex.
Then I read the article "Projection onto the probability simplex: An efficient algorithm with a simple proof, and an application" and compare the algorithm with your code. I think 'np.asarray(u)[:i]' should be replaced by 'np.asarray(u)[:i+1]' in the red line.
And after this change, it projects a result in the probability simplex.
Dear author, sorry for bothering you again. When I use optimizer 'afl', I notice the function 'flearn.utils.model_utils.project' sometimes returns a result not in the probability simplex. Then I read the article "Projection onto the probability simplex: An efficient algorithm with a simple proof, and an application" and compare the algorithm with your code. I think 'np.asarray(u)[:i]' should be replaced by 'np.asarray(u)[:i+1]' in the red line.
And after this change, it projects a result in the probability simplex.