set_input
code_loader.leap_binder.set_input
code_loader.leap_binder.set_input(
function=Callable[[int, PreprocessResponse], np.ndarray]
name=str
)
Args | Text |
---|---|
function | |
name | (str) with the given name of the input, e.g. image. |
from code_loader import leap_binder
from code_loader.contract.datasetclasses import PreprocessResponse
from code_loader.contract.enums import DatasetInputType
...
def image_input_encoder(idx: int, subset: PreprocessResponse) -> np.ndarray:
return subset.data.iloc[idx]['image'].astype('float32')
leap_binder.set_input(
function=image_input_encoder,
input_name='image'
)
Full examples can be found at the Dataset Integration section of the following guides:
Last modified 10mo ago