dimanche 9 avril 2017

sampling without replacement from a given non-uniform distribution in tensorflow

I'm looking for something similar to numpy.random.choice(range(10),replacement=False,size=2)

in tensorflow. The closest Op to it seems to be tf.multinomial() but it can't sample without replacement. Is there any other way to do sampling from a non-uniform distribution in tensorflow?

Thanks.




Aucun commentaire:

Enregistrer un commentaire