contrastive-predictive-coding icon indicating copy to clipboard operation
contrastive-predictive-coding copied to clipboard

Update needed for the code from tensorflow 1.4.0 to tensorflow 2

Open SagarDollin opened this issue 3 years ago • 1 comments

Hi @davidtellez, This is a great project to get started with CPC; however, while running this project in my local environment, I found that while most of the code is compatible, some lines of code are not very compatible with tensorflow 2. For example, fit_genererator throws a warning. Also, in the versions after tensorflow 2.1.0, it has been deprecated.

My proposal I intend to do the following things to update the project for users using tensorflow 2. 1. Make the existing project compatible with tensorflow 2 2. The callbacks function can incentivize time to train the model and therefore try to look for an alternative, and I will also compare the results when we do not use callback. 3. The project uses LeakyRelu as the activation in many layers; since the loss function is binary_crossentropy, I propose that we use ReLU instead.

Please let me know if you are open to the suggestions made. Also, your feedback is appreciated. Once we are on board, I will be sharing the issues that I discussed in detail. I will provide detailed information about the challenges of running the tensorflow 1.4.0 project on the tensorflow 2 environments.

Question: If this task is assigned to me, should I create a PR for the master branch or create a new branch for the updates.

Note: I'm currently focussing on the train_mode.py file.

SagarDollin avatar Aug 25 '21 16:08 SagarDollin

Hi, @SagarDollin , I am also interested with this project, have you finished this work with tensorflow 2?

943fansi avatar Jan 19 '22 12:01 943fansi