added der_log for torch machine
Created by: nikita-astronaut
Added a straightforward implementation of der_log
for torch machine, which is necessary for the "SR".
Since torch only returns averaged gradient over the whole batch, the loop over all samples had to be applied. Seems like there is no much faster implementation there...
I tested the code, the energy is seemingly decreasing :)