Skip to content
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

tf2 does not work for ExportModel #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

priyamtejaswin
Copy link

Hi @TheRockXu ,

Thanks for putting this together. Raising a PR because there was no way to create an issue on your repo.
I was trying to export the original checkpoints which Pegasus provides (wanted to replicate the results as closely as possible).
This might be useful for the next person who tries to export the model :)

The Transformer blocks in the original Pegasus code use modules from contrib (which has been removed from tf2.0).
As a result, the ExportModel functionality just breaks with tf2. ==> transformer_block

Code blocks used layer_norm from contrib, which could be replaced with Keras layers.
But the contrib_training.HParams in pegasus/params/pegasus_params.py does not have a replacement in tf2 ==> params.

If you ever find a workaround, do let me know.
Thanks!

The Transformer blocks in the original Pegasus code use modules from contrib (which has been removed from tf2.0).
As a result, the ExportModel functionality just breaks with tf2.

Code blocks used `layer_norm` from contrib, which could be replaced with Keras layers.
But the `contrib_training.HParams` in `pegasus/params/pegasus_params.py` does not have a replacement in tf2.

This might be useful for the next person who tries to export the model :)
@TheRockXu
Copy link
Owner

I have not. Sorry. Why would you replace it if it works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants