Last few days, I have been working to replicate implementation of
winner's solution of taxi trajectory competition using pytorch and fastai (and using their paper, github repo and last year’s fastai course).
Below is the link. (please scroll to the end - ln-72 for discussion issue)
But for that I need to make a custom loss function. Just making a normal function and calling it in fit doesn’t work and throws
TypeError: zip argument #71 must support iteration. Then how should I do it?
Although we customized a lot of stuff in
ML, course we still used
nn.NLLLoss() as loss function and I couldn’t find how to do it in fastai. (sorry if it’s there somewhere and I missed/ forgot it)
I am using this pytorch forum as reference, but I am still confused.
If anyone has done custom loss functions on pytorch, please help!
Thanks in advance