Hello,
Please refer this post
If you are still not able to get from this hint, you are basically not defining one of your code with the right function. Let me know if still running into trouble.
P.S. note you need to define the forward and backward propagation accordingly in the both code lines.
Regards
DP