TensorFlow.jl icon indicating copy to clipboard operation
TensorFlow.jl copied to clipboard

dynamic_rnn support

Open MaximeBouton opened this issue 6 years ago • 3 comments

Hello, I ran Pkg.update() recently and it seems like the package does not support dynamic_rnn anymore. I was wondering what was the reason for this? I have not had the time to test it on my own before it got commented out in the last merge #359 . Thanks for your help

MaximeBouton avatar Jan 30 '18 01:01 MaximeBouton

In short (and @malmaud will prob come along with the long), because of issues in how the dynamic RNNs stuff is implemented up-stream in the backend, and in the python client, the way it was implemented in the previous release was quiet a hack, and involved having to custom compile libtensorflow to silently ignore some errors (which we would then fix before they could affect anythng, in the case of dynamic RNNs (but potentially not in other cases)). With them disabled, now we can use the normal releases of libtensorflow.

There are some issues open upstream about what is wrong

oxinabox avatar Jan 30 '18 01:01 oxinabox

Thanks for the answer, Out of curiosity, I tried uncommenting the code for the while_loop and got something like that: Tensorflow error: Status: Input 0 ('Const_55') for 'while/Enter' was not previously added to ShapeRefiner Is that the sort of error that were ignored before?

Is reimplementing the dynamic while loop and dynamic RNN part of the short-term schedule?

I would be happy to help but after looking at the previous code for the while_loop it seems beyond reach to me right now.

MaximeBouton avatar Jan 30 '18 02:01 MaximeBouton

yes, that is the exact error being suppressed.

Somewhere in issues/PRs is a thread that explains what we were doing.

Basically we were generating a subsection of the graph that is the dynamic part, running it through some python code (as that is the only way to get something working (back-edges?)) to get a new graph, which we reimported back into the main graph.

The problem is that the graph subsection we were feeding python is missing some of its inputs as they were not exported, so it gets an error the first time the python code interacts with them (which just so happens to be ShapeRefiner). We suppress that error with a custom binary, then reimport the generated graph.

This is now all fine because once reimported all the inputs are there.

That is the simplified story, it might be a bit wrong, but it is the gist of it.

This won't be fixed until upstream adds a way to generate what ever it was (backedges?) without having to go via python. So far those issues have been open for like well over 6 months.

oxinabox avatar Jan 30 '18 04:01 oxinabox