Hi, I was curious, Is it possible to define a custom function like
def myMM(...):
return something
and assign its pointer to torch.mm() or some of other implicitly defined functions in torch(like torch.dot, torch.matmul or …), then instead of defining new Function for nn.linear or …; make nn.linear to perform matrix multiplication using myMM function inside its source code?
I just want to give a new definition to dot product in pytorch but I don’t want to redefine all nn modules like (conv, linear, lstm, …) as a customized function for my simulations.
I would be appreciated it if you could help me
TNX