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:
return preprocess.data.iloc[idx]['samples'].astype('float32')
Full examples can be found at the Dataset Integration section of the following guides:
Last modified 10mo ago