1

I'm wondering why the fn1 and fn2 arguments has to be python callables.

Also, does tf.cond acquire the GIL in Python?

1 Answer 1

1

They provide an abstraction to define the subgraphs during the construction of the true and false branch of the conditional.

Similar to all the other operators, tf.cond only adds a bunch of nodes in the graph that is used in run calls.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.