nlop.Constant

Contents

nlop.Constant#

class bartorch.nlop.Constant#

Bases: NonlinearOperator

Operator of no inputs returning a fixed tensor, BART’s nlop_const.

partial() fixes an input of another operator to a constant in one step.

Parameters:
  • value (torch.Tensor) – The output.

  • shape (tuple of int, default=None) – Output shape, C order; value’s shape by default.

Also has the methods and properties of NonlinearOperator.