-
Notifications
You must be signed in to change notification settings - Fork 266
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
Port code to python 3 #53
Comments
@adeshpande3 let me know what you think of these changes, and also if you'd like me to know anything while porting. |
Yeah this sounds fantastic to me, appreciate it! Lmk if I can be helpful |
@adeshpande3 Everything except |
Ahhh gotcha interesting, don't have as much bandwidth rn but will take a look over the weekend. I have no doubt there is an alternative but it'll probably require a bit of a refactor. |
@adeshpande3 any updates on |
Hey, unfortunately I was only able to take a cursory look. Unfortunately this stemmed from me making the choice back then to use a Will try to take another look this weekend, but think it might be slightly costly to rearchitect and ramp back up on to find a solution. I'm open to finding other folks to help maintain this though (since I know I haven't had as much free time). Is there a way to make this a formal Issue and see if folks can contribute? |
@adeshpande3 I think that's our only choice. I'd appreciate it if you could make an issue describing some primary things-
Also some guidelines when someone does take it on -
The reason I'd like you to do this is because you've a better understanding of this function than I do haha |
Ya totally fair. Will do so by Sunday night at the latest. Thanks for pushing on this |
any updates on this? |
Python 2 has reached EOL and it's time for this repo to upgrade. I've been working on a basic port for awhile and I'd like to detail my approach-
General
encoding='utf-8'
will be included as an extra parameter in allopen(....)
commandsprint 'string'
will be changed toprint('string')
raw_input
(s) will be changed toinput()
dict.iterItems()
will be changed todict.items()
Tensorflow
We will be using
tensorflow 2.1.0
, please note there has been drastic changes in this version compared to the one we are using. I'm only focusing on replacing the old commands with their alternatives. The newtensorflow
probably offers many improved features and it might even have different behaviours for the existing commands, which I'll not be focusing on.tf.Session()
will be replaced withtf.compat.v1.Session()
tf.compat.v1.disable_eager_execution()
, without this we cannot useplaceholder()
tf.random_uniform()
will be replaced withtf.random.uniform()
tf.truncated_normal()
will be replaced withtf.random.truncated_normal()
tf.placeholder()
will be replaced withtf.compat.v1.placeholder
tf.train.GradientDescentOptimizer()
will be replaced withtf.compat.v1.train.GradientDescentOptimizer()
tf.global_variables_initializer()
will be replaced withtf.compat.v1.global_variables_initializer()
*more changes soon
As of now,
createDataset.py
andWord2Vec.py
are completely overhauled withpython 3
, I am currently working on portingSeq2Seq.py
and will be posting my progress and/or hurdles here. Please be on a lookout for that!The text was updated successfully, but these errors were encountered: