π Geometric Computer Vision Library for Spatial AI
OperationBase.magnitude_range used to be a plain attribute: assigning to it changed the bounds the magnitude is clamped to, and for an nn.Parameter range nn.Module also registered the parameter under that name. It is now a read-only property that reads the wrapped generator's current range, so assigning to it raises AttributeError (KeyError for an nn.Parameter); pass the range when building the operation instead. For an nn.Parameter range, state_dict() and named_parameters() no longer have a magnitude_range entry, and parameters() yields the range last rather than first, so an optimizer state saved before this change no longer matches and has to be rebuilt. State dicts and pickles saved before this change still load. A range assigned to magnitude_range that differs from the generator's is dropped without a warning, and the generator's range applies. In the other direction, on an older kornia a state dict with an nn.Parameter range saved now needs strict=False, and a pickled operation with a learnable magnitude or a pickled RandAugment raises AttributeError.