Input Encoder

The input encoder generates a sample with index idx from the subset SubsetResponse object. This sample will later be fetched as input by the network. The function is called for every evaluated sample. There should be a separate encoder for each input.
from code_loader.contract.datasetclasses import PreprocessResponse
def input_encoder(idx: int, preprocess: PreprocessResponse) -> np.ndarray:
Usage within the full script can be found at the Dataset Script.


Full examples can be found at the Dataset Integration section of the following guides: