Get Uploaded Models
-
get_uploaded_models
(self) → List[netspresso.compressor.core.model.Model] Get the list of uploaded models.
- Raises
e – If an error occurs while getting the uploaded model list.
- Returns
The list of uploaded models.
- Return type
List[Model]
Details of Returns
-
class
Model
(model_id: str, model_name: str, task: str, framework: str, model_size: float, flops: float, trainable_parameters: float, non_trainable_parameters: float, number_of_layers: int, input_shapes: List[netspresso.compressor.core.model.InputShape] = <factory>)[source] Represents a uploaded model.
-
model_id
The ID of the model.
- Type
str
-
model_name
The name of the model.
- Type
str
-
input_shapes
The input shapes of the model.
- InputShape Attributes:
batch (int): The batch size of the input tensor.
channel (int): The number of channels in the input tensor.
dimension (List[int]): The dimensions of the input tensor.
- Type
List[InputShape]
-
model_size
The size of the model.
- Type
float
-
flops
The FLOPs (floating point operations) of the model.
- Type
float
-
trainable_parameters
The number of trainable parameters in the model.
- Type
float
-
non_trainable_parameters
The number of non-trainable parameters in the model.
- Type
float
-
number_of_layers
The number of layers in the model.
- Type
float
-
Example
from netspresso.compressor import ModelCompressor
compressor = ModelCompressor(email="YOUR_EMAIL", password="YOUR_PASSWORD")
uploaded_models = compressor.get_uploaded_models()
Output
>>> uploaded_models
[Model(
model_id="5eeb0edb-57d2-4a20-adf4-a6c05516015d",
model_name="YOUR_MODEL_NAME",
task="image_classification",
framework="tensorflow_keras",
input_shapes=[InputShape(batch=1, channel=3, dimension=[32, 32])],
model_size=12.9641,
flops=92.8979,
trainable_parameters=3.3095,
non_trainable_parameters=0.0219,
number_of_layers=0,
)]