File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ def get_regularization(self):
454454 for mapping in self .mapping :
455455 reg_func = Sparse (
456456 forward_mesh or self .inversion_mesh .mesh ,
457- active_cells = self .models .active_cells ,
457+ active_cells = self .models .active_cells if forward_mesh is None else None ,
458458 mapping = mapping ,
459459 reference_model = self .models .reference ,
460460 )
@@ -481,14 +481,15 @@ def get_regularization(self):
481481 norm = mapping * getattr (self .models , f"{ comp } _norm" )
482482
483483 if isinstance (fun , SparseSmoothness ):
484- if is_rotated and not forward_mesh :
485- fun = set_rotated_operators (
486- fun ,
487- neighbors ,
488- comp ,
489- self .models .gradient_dip ,
490- self .models .gradient_direction ,
491- )
484+ if is_rotated :
485+ if forward_mesh is None :
486+ fun = set_rotated_operators (
487+ fun ,
488+ neighbors ,
489+ comp ,
490+ self .models .gradient_dip ,
491+ self .models .gradient_direction ,
492+ )
492493
493494 else :
494495 weight = (
You can’t perform that action at this time.
0 commit comments