ModelHub
abstract class ModelHub
Content copied to clipboard
This is an abstract class which provides methods for loading models, its weights and labels (for prediction purposes).
Since
0.2
Constructors
Functions
get
Link copied to clipboard
operator fun <T : InferenceModel, U : InferenceModel> get(modelType: ModelType<T, U>): U
Content copied to clipboard
This operator equivalent to loadPretrainedModel.
loadModel
Link copied to clipboard
abstract fun <T : InferenceModel, U : InferenceModel> loadModel(modelType: ModelType<T, U>, loadingMode: LoadingMode = LoadingMode.SKIP_LOADING_IF_EXISTS): T
Content copied to clipboard
Loads model configuration without weights.
loadPretrainedModel
Link copied to clipboard
fun <T : InferenceModel, U : InferenceModel> loadPretrainedModel(modelType: ModelType<T, U>, loadingMode: LoadingMode = LoadingMode.SKIP_LOADING_IF_EXISTS): U
Content copied to clipboard
Loads pretrained model of modelType from the ModelHub in loadingMode.