bartorch.nlop.Derivative

bartorch.nlop.Derivative#

class bartorch.nlop.Derivative(op, output=0, input=0)#

DF/dx_input of one output of a nonlinear operator, as a linear one.

nlop_get_derivative. This is a view: the point is wherever the operator’s last application left it, and it moves with the next one. That is what makes it usable as the inner problem of a Gauss-Newton step, where the linearisation point is the iterate, and what makes it wrong to hold on to across an unrelated evaluation.

Parameters:
  • op (NonlinearOperator) – A BART-backed operator. One defined in Python by forward, derivative and adjoint has no handle to take a derivative of; use linearize() for those.

  • output (int) – Which output and which input, counted BART’s way.

  • input (int) – Which output and which input, counted BART’s way.

__init__(op, output=0, input=0)#

Methods

A(x, **kwargs)

A x, under deepinv's name.

A_adjoint(y, **kwargs)

A^H y, under deepinv's name, recorded for autograd.

A_adjoint_A(x, **kwargs)

A^H A x, under deepinv's name, recorded for autograd.

A_dagger(y, **kwargs)

The pseudo-inverse, under deepinv's name.

__init__(op[, output, input])

adjoint(y[, out])

A^H y, without recording for autograd.

cogram()

A A^H as an operator.

conj()

conj(A): conjugate the input, apply, conjugate the output.

forward(x[, out])

A x, without recording for autograd.

gram()

A^H A as an operator.

normal(x[, out])

A^H A x.

opnorm()

The spectral norm, by BART's power iteration on A^H A.

pinv(y[, damp])

(A^H A + damp I)^-1 A^H y, the damped least-squares solution.

to_nonlinear()

The same operator as a NonlinearOperator.

Attributes

H

A^H, from BART's own adjoint constructor.

T

A^T, the adjoint without the conjugation, as conj(A).H.

codim_rank

How many axes the codomain has.

codim_shape

The codomain, under pyxu's name for it; the same as oshape.

codim_size

How many elements the codomain holds.

device

dim_rank

How many axes the domain has.

dim_shape

The domain, under pyxu's name for it; the same as ishape.

dim_size

How many elements the domain holds.

ishape

oshape