gfn.envs.preprocessors
Submodules
Package Contents
Classes
Preprocessor applicable to environments with discrete states. |
|
Simple preprocessor applicable to environments with uni-dimensional states. |
|
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 |
|
Base class for Preprocessors. The goal is to transform tensors representing raw states |
- class gfn.envs.preprocessors.EnumPreprocessor(get_states_indices)
Bases:
PreprocessorPreprocessor applicable to environments with discrete states.
- Parameters
get_states_indices (Callable[[gfn.containers.States], OutputTensor]) –
- name = EnumPreprocessor
- preprocess(states)
- class gfn.envs.preprocessors.IdentityPreprocessor(output_shape)
Bases:
PreprocessorSimple preprocessor applicable to environments with uni-dimensional states. This is the default preprocessor used.
- Parameters
output_shape (Tuple[int]) –
- name = IdentityPreprocessor
- preprocess(states)
- Parameters
states (gfn.containers.States) –
- Return type
OutputTensor
- class gfn.envs.preprocessors.KHotPreprocessor(height, ndim, get_states_indices)
Bases:
gfn.envs.preprocessors.base.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.containers.states.States], OutputTensor]) –
- name = k_hot
- preprocess(states)
- class gfn.envs.preprocessors.OneHotPreprocessor(n_states, get_states_indices)
Bases:
gfn.envs.preprocessors.base.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.containers.states.States], OutputTensor]) –
- name = one_hot
- preprocess(states)
- class gfn.envs.preprocessors.Preprocessor(output_shape)
Bases:
abc.ABCBase class for Preprocessors. The goal is to transform tensors representing raw states to tensors that can be used as input to neural networks.
- Parameters
output_shape (Tuple[int]) –
- name :str = Preprocessor
- __call__(states)
- Parameters
states (gfn.containers.States) –
- Return type
OutputTensor
- __repr__()
Return repr(self).
- abstract preprocess(states)
- Parameters
states (gfn.containers.States) –
- Return type
OutputTensor