Tabular Data Error

When experimenting with tabular data, which has target a float value, gives following error :

RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #2 ‘other’

Googling this shows that there is type mismatch of tensor in PyTorch. I changed the accuracy function of fast ai, to support this type following this post, then this error get resolved but the accuracy it shows is 0.000. Any idea how to solve this?

Could you share your notebook? Or how you create your databunch, model, etc?