modlee.model_metafeatures module

modlee.model_metafeatures.ImageClassificationMetafeatures

alias of ImageModelMetafeatures

class modlee.model_metafeatures.ImageModelMetafeatures(torch_model: Module, *args, **kwargs)[source]

Bases: ModelMetafeatures

get_output_shape()[source]
class modlee.model_metafeatures.ImageSegmentationModelMetafeatures(torch_model: Module, *args, **kwargs)[source]

Bases: ImageModelMetafeatures

get_output_shape()[source]
class modlee.model_metafeatures.ModelEncoder(*args, **kwargs)[source]

Bases: Graph2Vec

classmethod from_pkl(path)[source]
save(path)[source]
class modlee.model_metafeatures.ModelMetafeatures(torch_model: Module, *args, **kwargs)[source]

Bases: object

static dataframe_lists_to_columns(df: DataFrame)[source]

Split dataframe columns that are lists to separate, indexed columns

Parameters:

df – _description_

get_embedding(*args, **kwargs)[source]
static get_graph_dataframe(onnx_graph, *args, **kwargs)[source]

Parse the layers of the model, maybe as a dataframe? With columns of layer type, parameters, indices (position in graph) Can then calculate parameters e.g. counts, parameter ranges, etc This almost seems like a converter function

static get_layer_counts(df: DataFrame)[source]

Get the counts of each layer type in a dataframe

Parameters:

df – _description_

abstract get_output_shape()[source]
static get_parameter_statistics(df: DataFrame | Series)[source]

Get the statistics of a single-column dataframe or series

Parameters:

df – _description_

get_properties(*args, **kwargs)[source]
class modlee.model_metafeatures.TextModelMetafeatures(torch_model, *args, **kwargs)[source]

Bases: ModelMetafeatures