tom:

wrote a neat tutorial how to do this:


thanks for your reply. maybe i did not clarify it. I  mean to change or add new methods for the built-in functions in pytorch and the methods are  also written in python.
for example, I want to add a new transform method for ImageFolder function (which is build-in in pytorch).
so what is the general way?