gfn.gym.helpers.preprocessors
Module Contents
Classes
Base class for Preprocessors. The goal is to transform tensors representing raw states |
|
Base class for Preprocessors. The goal is to transform tensors representing raw states |
- class gfn.gym.helpers.preprocessors.KHotPreprocessor(height, ndim, get_states_indices)
Bases:
gfn.preprocessors.PreprocessorBase class for Preprocessors. The goal is to transform tensors representing raw states to tensors that can be used as input to neural networks.
- Parameters
height (int) –
ndim (int) –
get_states_indices (Callable[[gfn.states.States], torchtyping.TensorType[batch_shape, input_dim]]) –
- preprocess(states)
- class gfn.gym.helpers.preprocessors.OneHotPreprocessor(n_states, get_states_indices)
Bases:
gfn.preprocessors.PreprocessorBase class for Preprocessors. The goal is to transform tensors representing raw states to tensors that can be used as input to neural networks.
- Parameters
n_states (int) –
get_states_indices (Callable[[gfn.states.States], torchtyping.TensorType[batch_shape, input_dim]]) –
- preprocess(states)