dasf.ml.inference.loader.torch

Classes

TorchLoader

Model Loader for Torch models

Module Contents

class dasf.ml.inference.loader.torch.TorchLoader(model_class_or_file, dtype=torch.float32, checkpoint=None, device=None)[source]

Bases: dasf.ml.inference.loader.base.BaseLoader

Model Loader for Torch models

model_class_or_file: class or file with model definition dtype: data type of model input checkpoint: model chekpoint file device: device to place model (“cpu” or “gpu”)

model_class_or_file
dtype
checkpoint
device
load_model(**kwargs)[source]

Load Model method is specific for each framework/model.

inference(model, data)[source]