Hey, I want you to get help, but with all due respect, is this question really a fastai course question?
Your code seems to use tensorflow, which isn’t used in fastai. I think you’ll be better off asking your question in the right forum.
Also, the better you ask questions, the more likely you’ll get help. So, a few tips:
- only ask about 1 topic per post.
- show your full code & say what you’ve tried - see How to ask for help
- you can format code blocks with triple backtips - this make’s them easier to read
Wish you all the best!