unienv_interface.transformations.crop¶
Classes:
| Name | Description |
|---|---|
CropTransformation |
|
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.
Methods:
| Name | Description |
|---|---|
validate_source_space |
|
get_crop_range |
|
get_target_space_from_source |
|
transform |
|
direction_inverse |
|
serialize |
|
deserialize_from |
|
close |
|
Attributes:
| Name | Type | Description |
|---|---|---|
has_inverse |
|
|
crop_low |
|
|
crop_high |
|
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