C2W2_Assignment getting AttributeError: 'Tensor' object has no attribute 'indices'

{moderator edit - solution code removed}

Getting error like this:
AttributeError: ‘Tensor’ object has no attribute ‘indices’

Please help

What’s _fill_in_missing ?

Posting solution code in a public topic is discouraged and can get your account suspended. It’s okay to share stacktrace on a public post and send code to a mentor via direct message. Please clean up the post.
Here’s the community faq to get started.