model_maintainer#

Module Contents#

ModelMaintainer

Maintain PyTorch model.

class ModelMaintainer(model, cuda)#

Bases: object

Maintain PyTorch model.

Provide necessary attributes and operation methods. More features with local or global model will be implemented here.

Parameters
property model(self)#

Return torch.nn.module

property model_parameters(self)#

Return serialized model parameters.

property model_gradients(self)#

Return serialized model gradients.

property shape_list(self)#

Return shape of model parameters.

Currently, this attributes used in tensor compression.