Add reverse mode auto diff function to matrix inverse
package io.improbable.keanu.vertices.dbl.nonprobabilistic.operators.unary;
+import java.util.Map;
+
import io.improbable.keanu.tensor.dbl.DoubleTensor;
+import io.improbable.keanu.vertices.Vertex;
import io.improbable.keanu.vertices.dbl.DoubleVertex;
import io.improbable.keanu.vertices.dbl.nonprobabilistic.diff.DualNumber;
+import io.improbable.keanu.vertices.dbl.nonprobabilistic.diff.PartialDerivatives;
public class MatrixInverseVertex extends DoubleUnaryOpVertex {
@@ -20,6 +24,11 @@ public class MatrixInverseVertex extends DoubleUnaryOpVertex {
return dualNumber.matrixInverse();
}
+ @Override
+ public Map<Vertex, PartialDerivatives> reverseModeAutoDifferentiation(PartialDerivatives derivativeOfOutputsWithRespectToSelf) {
+
+ }
+
private static int[] checkInputIsSquareMatrix(int[] shape) {
if (shape.length != 2) {
throw new IllegalArgumentException("Can only invert a Matrix (received rank: " + shape.length + ")");
