The issue seems to be raised by act(act_fun), which seems to be a custom method defined in .common, so you might want to check its implementations, as it’s not shared here.
If you get stuck, please post a minimal, executable code snippet to reproduce this issue.