File size: 3,739 Bytes
a01ef8c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
API Reference
=============

Datasets
--------

.. currentmodule:: tlt.datasets

The simplest way to create datasets is with the dataset factory methods :meth:`load_dataset`, for using a
custom dataset, and :meth:`get_dataset`, for downloading and using a third-party dataset from a catalog such as TensorFlow
Datasets or Torchvision.

Factory Methods
***************

.. automodule:: tlt.datasets.dataset_factory
   :members: load_dataset, get_dataset

Class Reference
***************

Image Classification
^^^^^^^^^^^^^^^^^^^^

.. currentmodule:: tlt.datasets.image_classification

.. autosummary::
   :toctree: _autosummary
   :nosignatures:

    tfds_image_classification_dataset.TFDSImageClassificationDataset
    torchvision_image_classification_dataset.TorchvisionImageClassificationDataset
    tf_custom_image_classification_dataset.TFCustomImageClassificationDataset
    pytorch_custom_image_classification_dataset.PyTorchCustomImageClassificationDataset
    image_classification_dataset.ImageClassificationDataset

Text Classification
^^^^^^^^^^^^^^^^^^^

.. currentmodule:: tlt.datasets.text_classification

.. autosummary::
   :toctree: _autosummary
   :nosignatures:

    tfds_text_classification_dataset.TFDSTextClassificationDataset
    hf_text_classification_dataset.HFTextClassificationDataset
    tf_custom_text_classification_dataset.TFCustomTextClassificationDataset
    hf_custom_text_classification_dataset.HFCustomTextClassificationDataset
    text_classification_dataset.TextClassificationDataset

Base Classes
^^^^^^^^^^^^

.. note:: Users should rarely need to interact directly with these.

.. currentmodule:: tlt.datasets

.. autosummary::
   :toctree: _autosummary
   :nosignatures:

    pytorch_dataset.PyTorchDataset
    tf_dataset.TFDataset
    hf_dataset.HFDataset
    dataset.BaseDataset

Models
------

.. currentmodule:: tlt.models

Discover and work with available models by using model factory methods. The :meth:`get_model` function will download
third-party models, while the :meth:`load_model` function will load a custom model, from either a path location or a
model object in memory. The model discovery and inspection methods are :meth:`get_supported_models` and
:meth:`print_supported_models`.

Factory Methods
***************

.. automodule:: tlt.models.model_factory
   :members: get_model, load_model, get_supported_models, print_supported_models

Class Reference
***************

Image Classification
^^^^^^^^^^^^^^^^^^^^

.. currentmodule:: tlt.models.image_classification

.. autosummary::
  :toctree: _autosummary
  :nosignatures:

   tfhub_image_classification_model.TFHubImageClassificationModel
   tf_image_classification_model.TFImageClassificationModel
   keras_image_classification_model.KerasImageClassificationModel
   torchvision_image_classification_model.TorchvisionImageClassificationModel
   pytorch_image_classification_model.PyTorchImageClassificationModel
   pytorch_hub_image_classification_model.PyTorchHubImageClassificationModel
   image_classification_model.ImageClassificationModel

Text Classification
^^^^^^^^^^^^^^^^^^^

.. currentmodule:: tlt.models.text_classification

.. autosummary::
  :toctree: _autosummary
  :nosignatures:

   tf_text_classification_model.TFTextClassificationModel
   pytorch_hf_text_classification_model.PyTorchHFTextClassificationModel
   tf_hf_text_classification_model.TFHFTextClassificationModel
   text_classification_model.TextClassificationModel

Base Classes
^^^^^^^^^^^^

.. note:: Users should rarely need to interact directly with these.

.. currentmodule:: tlt.models

.. autosummary::
   :toctree: _autosummary
   :nosignatures:

    pytorch_model.PyTorchModel
    tf_model.TFModel
    hf_model.HFModel
    model.BaseModel