Thank you for your comment.
I tried to replace the binary_activate as follows, but I still get same error.
So, It seems to be the way of using Function.
class binary_activate(Function):
    def forward(self,x):
        self.save_for_backward(x)
        return x
    def backward(self, grad_output):
        result = self.saved_tensors[0]
        grad_input = result
        return grad_input

"I would suggest not to save the Function instance as a class attribute(especially if the Function has buffer)."
Excuse me, but I don’t get this meaning. I also tried to declare and call the binary_activate class out of the Model class, though, still have the same error.
Is this the way you mentioned? If not, could you tell me more detail?
Thanks.