java icon indicating copy to clipboard operation
java copied to clipboard

What is the difference between statefulIf and StatelessIf and when is a ConcreteFunction stateful?

Open JimClarke5 opened this issue 4 years ago • 1 comments
trafficstars

@rnett Could you please explain tf.statefulIf vs tf.statelessIf and when a ConcreteFunction is stateful vs stateless?

JimClarke5 avatar Jun 28 '21 17:06 JimClarke5

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.

rnett avatar Jun 28 '21 20:06 rnett