File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -70,17 +70,16 @@ def __init__(
7070 # pylops forward and adjoint (this will call matmat and rmatmat)
7171 self .transpf = np .roll (np .arange (2 if flatten else len (self .dims ) + 1 ), - 1 )
7272 self .transpb = np .roll (np .arange (2 if flatten else len (self .dims ) + 1 ), 1 )
73- self .batch = batch
7473 self .Op = Op
75- self ._register_torchop ()
74+ self ._register_torchop (batch )
7675 self .Top = _TorchOperator .apply
7776
78- def _register_torchop (self ):
77+ def _register_torchop (self , batch : bool ):
7978 # choose _matvec and _rmatvec
80- self ._hmatvec : Callable
81- self ._hrmatvec : Callable
79+ self ._hmatvec = None
80+ self ._hrmatvec = None
8281
83- if not self . batch :
82+ if batch :
8483 self ._hmatvec = lambda x : self .Op @ x
8584 self ._hrmatvec = lambda x : self .Op .H @ x
8685 else :
You can’t perform that action at this time.
0 commit comments