d3rlpy.preprocessing.PixelScaler¶
-
class
d3rlpy.preprocessing.
PixelScaler
[source]¶ Pixel normalization preprocessing.
\[x' = x / 255\]from d3rlpy.dataset import MDPDataset from d3rlpy.algos import CQL dataset = MDPDataset(observations, actions, rewards, terminals) # initialize algorithm with PixelScaler cql = CQL(scaler='pixel') cql.fit(dataset.episodes)
Methods
-
get_params
(deep=False)[source]¶ Returns scaling parameters.
PixelScaler returns empty dictiornary.
Parameters: deep (bool) – flag to deeply copy objects. Returns: empty dictionary. Return type: dict
-
reverse_transform
(x)[source]¶ Returns reversely transformed observations.
Parameters: x (torch.Tensor) – normalized observation tensor. Returns: unnormalized pixel observation tensor. Return type: torch.Tensor
-
transform
(x)[source]¶ Returns normalized pixel observations.
Parameters: x (torch.Tensor) – pixel observation tensor. Returns: normalized pixel observation tensor. Return type: torch.Tensor
Attributes
-
TYPE
= 'pixel'¶
-