C3W2 Assignment: TypeError: Descriptors cannot be created directly


hi! why do i get this type of error? any ideas? thank you

are you encountering this error in running in the courser provided colab environment?

yes. then I make a copy of the notebook and still the same

@abdee

please downgrade protobuf. That is now added in the pip installs when TF is downgraded to TF2.8 before submission:

!pip install tensorflow==2.8.0 --quiet
!pip install keras==2.8.0 --quiet
!pip install protobuf==3.20.*

i have run the code. then this error appear

can you try to install protobuf version and remove the tensorflow and keras pip install, and then run the cell.

let me know what happens

the error still

ok this is throwing probably because keras version issue. wait let me report this to staff.

@abdee

I have just informed the staff. the protobuf issue was reported earlier but was resolved by downgrading the versions,but in your case I think downgrading is resulting another issue due to probably version issue with tensorflow and keras.

Thank you for reporting this, and please wait for my or staff response on this.

Regards
DP

i will look forward to it. thanks

@Alavudeen_Ahamed

Please follow this thread. your issue is same to the learner’s issue. kindly wait, as I have reported this issue to staff and they are working on it

Hi Abdee. Thank you for reporting this. The issue is with the protobuf package. I see that you tried downgrading this earlier but you might have inadvertently affected another package as well. Please reopen the notebook from your classroom to see the updates. Remember to restart the runtime after that cell, else you might see an error. I tried this and it works with the expected solution and generates a successful submission. Hope this helps!

2 Likes

@Alavudeen_Ahamed

can you do the same thing what l.t has suggested. your issue is same as for import error issue
but if you still failing grader then let me know, I will look your codes then.

thank you chris and DP. it’s been very helpful

2 Likes

Hi @Deepti_Prasad
I reopened the notebook after the update and redid the exercise codes. However, when I ran the training loop, an error occurred, as shown in the screenshot.

ok Will check your codes, get back. seems like image tensor are of different shape.

@Alavudeen_Ahamed I am going to respond to your created post just to avoid confusion with the post creators post as this issue was totally related dependency version issue.

Your post, solution response