miniosl.inference¶
inference modules
- class miniosl.inference.InferenceModel(device)[source]¶
interface for inference using trained models
- eval(input: ndarray, *, take_softmax: bool = False) tuple[source]¶
return (move, value, aux) tuple, after softmax
- miniosl.inference.export_executorch(model: PVNetwork, device: str, filename: str, quiet: bool) None[source]¶
export for executorch
- miniosl.inference.load(path: str, device: str = '', torch_cfg: Mapping = mappingproxy({}), *, compiled: bool = False, strict: bool = True, remove_aux_head: bool = False) InferenceModel[source]¶
factory method to load a model from file
- Parameters:
path – filepath,
device – torch device such as ‘cuda’, ‘cpu’,
torch_cfg – network specification needed for TorchInfer.