unienv_interface.transformations.crop¶
CropTransformation
¶
CropTransformation(crop_low: Union[int, float, BArrayType], crop_high: Union[int, float, BArrayType])
Bases: DataTransformation
Initialize Crop Transformation. Args: crop_low: Lower bound for cropping the data. crop_high: Upper bound for cropping the data.
validate_source_space
¶
validate_source_space(source_space: Space[Any, BDeviceType, BDtypeType, BRNGType]) -> None
get_crop_range
¶
get_crop_range(source_space: BoxSpace[Any, BDeviceType, BDtypeType, BRNGType]) -> Tuple[BArrayType, BArrayType]
serialize
¶
serialize(source_space: Optional[Space[Any, BDeviceType, BDtypeType, BRNGType]] = None) -> Dict[str, Any]
deserialize_from
classmethod
¶
deserialize_from(json_data: Dict[str, Any], source_space: Optional[Space[Any, BDeviceType, BDtypeType, BRNGType]] = None) -> CropTransformation