haskell
haskell copied to clipboard
It is easy to use withNameScope/withDevice incorrectly with pure ops
If you do something like
TF.withNameScope "foo" $ return $ TF.add 1 2
it will not set the name scope of the add op as expected. You have to use TF.render instead of return.
Another, trickier example is discussed here https://github.com/tensorflow/haskell/pull/11#discussion_r85443322