-
Notifications
You must be signed in to change notification settings - Fork 484
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
Remove dependency from tensorflow #127
Conversation
Sorry for the delay. I agree with dropping tensorflow dependency, but I am worried if we can further simlify hparams functionality. Just a quick thought, but for example, could we replace it with a simpler python class that supports 1) dictionary-like key/value initialization 2) class-like accessor 3) parsing from json ? Isn't it enough? |
Probably a simpler class would be enough, but see the following thoughts:
In sum, I believe that it may be more convenient to use my patch than to program a full new solution. |
@@ -1,9 +1,9 @@ | |||
import tensorflow as tf | |||
import hparam_tf.hparam |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be simply import hparam_tf
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just get the file hparam.py out of the subfolder, rename it to hparam_tf.py and import it directly as you suggest. I think it will work.
I just created the subfolder to add the readme where its origin is explained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. I misunderstood there's __init__py
in the hparams_tf
directory.
Could you fix requirements in README as well? https://github.com/r9y9/deepvoice3_pytorch/tree/8cee593f3b198ef894e918f976c9a6f3041dc421#requirements Then I will merge. |
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
Tensorflow is only required in this project for defining the hyperparameters structure.
In different architectures I found problems getting an environment with both pytorch and tensorflow in appropriate sync of libraries and python versions.
That is the motivation for this modification.
You might need to add some new dependencies to setup.py if these are not already required by the rest of the code or previous dependencies (I think everything is covered). These are the imports in hparam.py:
__future__ json numbers re six
I hope you can consider testing and merging this pull request.
Thank you.