Namespace nuTens::autograd

namespace autograd

Functions

nuTens::Tensor grad(const nuTens::Tensor &final, const nuTens::Tensor &leaf)

compute the gradient of β€œfinal” with respect to β€œleaf”

class NoGrad

Public Functions

inline NoGrad()

Disable autograd calculations within some scope, improving performance where you are not interested in calculating gradients Instantiate at the start of the scope where you want to disable gradient calculations like so.

 #include <nuTens/tensors/tensor.hpp>
...
  {
auto noGrad = nuTens::NoGrad();
      ...
      < speedy non differentiated code >
      ...
  }