Skip to content

[refact] Added activation model

Activation function are introduced for extending the Gauss-Newton model. Instead of having cost = .5r.Tr = sum(.5ri**2), we put cost = sum(a(ri)), where a is a scalar-to-scalar function. For example, the classical case is a(x)=.5x**2. The activation model should return the vector of activation [a(r1) ... a(rn) ] in the forward pass (calc function) and the first and second derivatives in the backward pass (calcdiff). Here I introduced the activation function in the cost3d only. If accepted, this first commit should be extended to the other cost models. In particular, it should replace the cost weights manually added to the cost-regx.

Merge request reports