Convolutional Neural Networks - DLS[4] Week 2 Assignment Residual Networks and Tensorflow 2.16 set_learning_phase deprecated

In the Residual Networks Assignment in Week 2 , I do have it working and submitted the assignment.

Additionally, I tried running the notebook on my local computer in which I am running Tensorflow 2.16 and discovered that set_learning_phase API has been deprecated.
Moreover, the earliest version of Tensorflow I can install is 2.13.
Will the associated python files such as resnets_utils, public_tests, and ipynb be updated for working on later versions of Tensorflow?
Thanks

Mani

1 Like

I am aware of no plans to update the course materials.

You can download the .whl file for your machine from pypi.org and install using pip

I think @Mubsi should be notified and known about this or in case he wants to get the version updated in the notebook assignment.

version deprecation further leads more changes in other parameters or codes, this requirement some planning on developer team side probably.

We had faced similar issue for tensorflow specialised technique assignments when @chris.favila used to update the codes or assignment notebook to either work around with update version or the version codes were first written.

So @Mubsi informing you about this would be right way to let you know the changes in notebook for DLS.

Regards

DP

Hi @ManiR,

  • There no plans for updating the course content to the latest libraries in the near future.

  • You can still download a previous version of tensorflow. It depends on the python version you are using. For example (this is a dummy example, but it puts the point across), if you are using a newer python version, let’s say 3.11 or 3.12, then the least compatible TF version you could install might be TF 2.13.

    So (factual examples), in order to use TF version 2.9, you need python 3.8. To use TF 2.3, you need python 3.7. If you want to go lower, let’s say TF 2.0, you need python 3.6 and so on.

    Now, I must acknowledge if you have an Apple computer with silicon chip, then installing a lower TF version will be quite the challenge. Doable, but not as straightforward. If you have an intel chip, then all of this is quite straightforward.

Thanks for response.

I do have a MacOS. I am using Conda with different environments (for different versions). Anyways after a couple of attempts to install earlier Tensorflow/numpy/.. combinations. I concluded that I might as well try to get the code working on latest version of Tensorflow.
I did find there are multiple places where code needed to be changed - identity_block, public_tests, resnets_util.py, test_utils,py to get it all working.
I am using this as a learning exercise for me to understand more deeply.

So, just letting you know.

Full disclosure: I did use Cursor to help me make the changes.

Mani

2 Likes

That’s an excellent way to turn this into a learning opportunity! Wish you the best with that!

1 Like