-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tensorflow 2 compatibility #165
Comments
@emedvedev Any updates?? |
Or maybe just a guideline on what we need to change in order to work with tf2 |
@OctaM Yes that would be really helpful. |
I performed the same steps and got stuck there as well. The main issue seems to be the fact that the project is very dependent on the |
There's no plan to move this project to Tensorflow 2 yet, unfortunately, but contributions are welcome. I could create a branch to submit PRs against if there are several people who'd like to collaborate on that. |
@emedvedev |
@khu834 thank you so much! Created a https://github.com/emedvedev/attention-ocr/tree/tf2 branch :) |
Awesome, by the way, this is to completely convert to TF2 right? Not using tensorflow.compat.v1 |
Have you tried tf.raw_ops.MutableHashTable? The interface seems like it should do the same as tf.contrib.lookup.MutableHashTable |
Most instances of Which ones haven't you found a good replacement for? |
Ideally to completely convert, yes :)
…On Feb 23, 2021, 12:41 +0700, Kevin Chih Yao Huang ***@***.***>, wrote:
> I performed the same steps and got stuck there as well. The main issue seems to be the fact that the project is very dependent on the contrib module which has been completely removed in v2 and I can't seem to find many of the equivalent operations in other repos...
Most instances of contrib usage I found are fairly straightforward to replace. Things like xavier_initializer, batch_norm, dropout, and all the RNN cell types should all have TF2 equivalents.
Which ones haven't you found a good replacement for?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@emedvedev The training loop is not as straightforward, but may still be doable with tf.keras training routine (combined with a few custom Callback), this may take a bit more experimentation. Maybe initially we can keep this in tensorflow ops using GradientTape. Let me know if you have preferences |
I don't mind, tf.keras would make lots of sense imo. Thanks a lot for doing this!
…On Feb 25, 2021, 03:14 +0700, Kevin Chih Yao Huang ***@***.***>, wrote:
@emedvedev
I've read through the code, doing some planning now in terms of the code structuring.
Overall, would you mind if we convert to tf.keras API where possible? In TF2 I think that's pretty much the preferred interface at least for the model definition.
CNN model I think definitely makes sense to write in tf.keras. This also allows substituting the feature extraction with other models such as ResNet
Seq2Seq model I think should be convertible to tf.keras. I've done seq2seq before in keras it's not too bad.
The training loop is not as straightforward, but may still be doable with tf.keras training routine (combined with Callbacks), this may take a bit more experimentation. Maybe initially we can keep this in tensorflow ops using GradientTape.
Let me know if you have preferences
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
It would be great in the meantime to open and pr to a branch intended to work using tensorflow.compat.v1 and fixing tf.contrib dependencies. Or @githubpiyush and @vladdders, was that more difficult than expected? |
Ah! It's more than a year now and from what i remember i have completed this with tf.compat.v1 and yes it was a little difficult 😢 I don't have the code right now 😶 |
I've created a PR with the minimal work required to make the project functional on TF2: #198 |
Merged @mjpieters's PR: #198. Should support TF2 now. |
Can you tell me when can we expect this package with tensorflow 2.1.0 ?
The text was updated successfully, but these errors were encountered: