Wrong NumPy Version

In the first two blocks of this weeks assignment (the given code) I am getting errors involving incorrect numpy version. It states i have 1.19.5 when 1.20 is required, and if I add a pip install numpy=1.20, it states that tensorflow requires numpy~=1.19.4 and still won’t run. Any leads?

Hello Chris @chris.favila I think this one has to do with software updates.

Any ways of getting around it so the np.sum functions in the IoU and Dice Score evaluation step run? or shall I wait for moderators to fix the issue?

Hi @Greg_Woytkiw

Try with this combination:
!pip install tensorflow==2.9.2
!pip install keras==2.9
!pip install numpy==1.23

In the second cell instead of install tensorflow and keras 2.6.

Not sure if this will work, but i’ve been able to execute the notebook until visualize the validation images.

Please, let us know if it solves the problem :slight_smile:


Hi Greg! Welcome to the community! Do you mean you cannot import the packages? I just tried the lab and you can safely ignore the version incompatibility of those Colab-bundled packages. You won’t be using those except for matplotlib. However, at least for the functions used in this assignment, the downgraded numpy doesn’t affect the expected output. Thus, you should be able to complete the lab without downgrading matplotlib. We have to use tensorflow v2.6 for now because that’s what the grader uses. We’ll place a not about the errors in the lab to avoid confusion. Hope this helps!