java
java copied to clipboard
What is the difference between statefulIf and StatelessIf and when is a ConcreteFunction stateful?
trafficstars
@rnett Could you please explain tf.statefulIf vs tf.statelessIf and when a ConcreteFunction is stateful vs stateless?
I'm not sure tbh, it's an internal tensorflow distinction. I have been meaning to play with it to get an answer but haven't yet, you might have better luck making an issue in the main tensorflow repo. All I'm doing is propagating statefulness, i.e. if a stateful op is used in a ConcreteFunction, make the function stateful; if one of the if's functions is stateful, make the if stateful, etc. Generally you should just use ifOp and rely on that, it does it automatically.