nnopinf.operators.LinearAffineSpdTensorOperator#
- class nnopinf.operators.LinearAffineSpdTensorOperator(acts_on, depends_on, positive=True, name='LinearAffineSpdTensorOperator')[source]#
Bases:
Module\(f: (v,x) \mapsto \sum_{k=1}^{N} L_kD_kL_k^T x v_k\)
Constructs a linear affine SPD tensor operator
- Parameters:
acts_on (nnopinf.Variable) – The state the operators acts on, i.e., the \(x\)
depends_on (tuple of nnopinf.Variable) – The affine variables the operator depends on, i.e., the \(v\)
positive (bool) – Constructs an SPD operator if true, and an NPD operator if flase
name (string) – Operator name. Used when saving to file
- forward(inputs, return_jacobian=False)[source]#
Forward pass of operator
Warning
return_jacobian is currently not implemented
- Parameters:
inputs (dict(str, np.array)) – Dictionary of input data in the form of arrays referenced by the variable name, i.e., inputs[‘x’] = np.ones(3)
return_jacobian (bool, optional) – If True, return the (approximate) Jacobian in addition to the output.