Welcome to Deeplite Torch Zoo’s documentation!

deeplite_torch_zoo.wrappers.wrapper.create_model(model_name, pretraining_dataset, num_classes=None, pretrained=True, progress=False, fp16=False, device='cuda', **kwargs)

Tries to find a matching model creation wrapper function in the registry (for the corresponding model name and pretraining dataset name) and uses it to create a new model object, optionally with a custom number of output classes

Parameters
  • model_name – Name of the model to create

  • pretraining_dataset – Name of pretraining dataset to (partially) load the weights from

  • num_classes – Number of output classes in the new model

  • progress – Whether to enable the progressbar

  • fp16 – Whether to convert the model to fp16 precision

  • device – Loads the model either on a gpu (cuda, cuda:device_id) or cpu.

returns a corresponding model object (optionally with a custom number of classes)

deeplite_torch_zoo.wrappers.wrapper.get_data_splits_by_name(data_root, dataset_name, model_name=None, **kwargs)

The datasets function calls in the format of (get_`dataset_name`_for_`model_name`). Except for classification since the datasets format for classification models is the same. The function calls for classification models are in the format (get_`dataset_name`)

returns datasplits in the following format: {

‘train’: train_data_loader, ‘test’ : test_data_loader

}

deeplite_torch_zoo.wrappers.wrapper.get_model_by_name(model_name, dataset_name, pretrained=False, progress=False, fp16=False, device='cuda')

Tries to find a matching model creation wrapper function in the registry and uses it to create a new model object :param model_name: Name of the model to create :param dataset_name: Name of dataset the model was trained / is to be trained on :param pretrained: Whether to load pretrained weights :param progress: Whether to enable the progressbar :param fp16: Whether to convert the model to fp16 precision :param device: Loads the model either on a gpu (cuda, cuda:device_id) or cpu.

returns a corresponding model object (optionally with pretrained weights)

deeplite_torch_zoo.wrappers.wrapper.list_models(filter='', print_table=True, return_list=False, task_type_filter=None)

A helper function to list all existing models or dataset calls It takes a model_name or a dataset_name as a filter and prints a table of corresponding available models

Parameters

filter – a string or list of strings containing model name, dataset name or “model_name_dataset_name”

to use as a filter :param print_table: Whether to print a table with matched models to the console :param return_list: Whether to return a list with model names and corresponding datasets

Indices and tables