gfn.preprocessors
Module 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 |
- class gfn.preprocessors.EnumPreprocessor(get_states_indices)
Bases:
PreprocessorPreprocessor applicable to environments with discrete states.
- Parameters
get_states_indices (Callable[[gfn.states.States], torchtyping.TensorType[batch_shape, input_dim]]) –
- preprocess(states)
- class gfn.preprocessors.IdentityPreprocessor(output_dim)
Bases:
PreprocessorSimple preprocessor applicable to environments with uni-dimensional states. This is the default preprocessor used.
- Parameters
output_dim (int) –
- preprocess(states)
- Parameters
states (gfn.states.States) –
- Return type
torchtyping.TensorType[batch_shape, input_dim]
- class gfn.preprocessors.Preprocessor(output_dim)
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_dim (int) –
- __call__(states)
- Parameters
states (gfn.states.States) –
- Return type
torchtyping.TensorType[batch_shape, input_dim]
- __repr__()
Return repr(self).
- abstract preprocess(states)
- Parameters
states (gfn.states.States) –
- Return type
torchtyping.TensorType[batch_shape, input_dim]