Skip to content

Improve torch der log

Vicentini Filippo requested to merge improve_torch_der_log into master

Created by: gcarleo

This improves the gradient function (der_log) in Torch machines (follow-up of #335) reducing the number of calls to the underlying module and retaining the graph for subsequent calls of autograd.grad . In my experiments this version could be as much as 60% faster. @nikita-astronaut please have a look and see if this also improves your calculations

Merge request reports