Thanks for your reply.
Yes, I studied this page and had such implementation but as you see, it is a linear function. I can not find back end implementation of convolution layer to replace its operation with my operation. Do you have any recommendation about it?
I mean, I want to use cnn in pytorch, just replace conv1D with convZ(conv generated by Zahra) in which I replace + and * by - and /  
Best Regards