Custom Loss in Fastai

I am following what’s written here by Jeremy:

and one more post here: