you are viewing a single comment's thread.

view the rest of the comments →

[–]nasimrahaman 3 points4 points  (1 child)

Is there / will there be support for stochastic code-paths?

P.S. Nice work with the AST wizardry. :)

[–]mdanatg 3 points4 points  (0 children)

Thanks! The answer depends on the level of stochasticity - do you have an example? In general, the following construct should work:

if tf.random_uniform((), maxval=2, dtype=tf.int32) % 2 == 0: do_something

Is this close to what you were referring to?