Why pytorch assumes my function is a variable

I’m calling a function in another function and get the error ‘local variable’a’ referenced before assignment whereas ‘a’ is a function not a variable.
Any ideas how to fix this?

Probably the function named a is not visible in the current scope.
Could you post some code to reproduce this issue?

I figured what the problem was. I had a variable with the same name somewhere in the code that I was’n aware of.