@avinash_m
Can you post more code?
Based on the code piece you post here, I think you can cast your inputs and targets to double first. If you have other layers that need long, you can cast them to long later.