Ask or search…

Ground Truth Encoder

The ground truth encoder generates a ground truth value correlated with a sample, with index idx, from the preprocess. It will later be used as the ground truth for the loss function. This function is called for each evaluated sample.
For example:
from code_loader.contract.datasetclasses import PreprocessResponse
def gt_encoder(idx: int, preprocess: Union[PreprocessResponse, list]) -> 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: