pylops.PyTensorOperatorยถ
- class pylops.PyTensorOperator(LOp)[source]ยถ
PyTensor Op which applies a PyLops Linear Operator, including gradient support.
This class โconvertsโ a PyLops LinearOperator class into a PyTensor Op. This applies the LinearOperator in โforward-modeโ in self.perform, and applies its adjoint when computing the vector-Jacobian product (self.grad), as that is the analytically correct gradient for linear operators. This class should pass pytensor.gradient.verify_grad.
- Parameters:
- LOp
pylops.LinearOperator PyLops Linear operator
- LOp
Methods
L_op(inputs, outputs, output_grads)Construct a graph for the L-operator.
R_op(inputs, eval_points)Construct a graph for the R-operator.
__init__(LOp)add_tag_trace(thing[, user_line])Add tag.trace to a node or variable.
do_constant_folding(fgraph, node)Determine whether or not constant folding should be performed for the given node.
grad(inputs, output_grads)Construct a graph for the gradient with respect to each input variable.
inplace_on_inputs(allowed_inplace_inputs)Try to return a version of self that tries to inplace in as many as allowed_inplace_inputs.
make_node(x)Construct an Apply node that represent the application of this operation to the given inputs.
make_py_thunk(node, storage_map, ...[, debug])Make a Python thunk.
make_thunk(node, storage_map, compute_map, ...)Create a thunk.
perform(node, inputs, output_storage)Calculate the function on the inputs and put the variables in the output storage.
prepare_node(node, storage_map, compute_map, ...)Make any special modifications that the Op needs before doing
Op.make_thunk.