joschu / cgt

Computation Graph Toolkit
Other
628 stars 87 forks source link

Random number generation and graph simplification #54

Closed sbos closed 8 years ago

sbos commented 8 years ago

It seems that multiple calls to random number generation routines (cgt.randn and cgt.rand) can be reduced to a single call during graph simplification which is probably a bug.

The code example is https://gist.github.com/sbos/4cfe3e13510b8b670619.

Even if this is not a bug, such behaviour is not very obvious.

joschu commented 8 years ago

That was a bad bug...should be fixed now

sbos commented 8 years ago

Yes, it looks so. Thank you very much John!