pyanomaly.core.engine package

Submodules

pyanomaly.core.engine.engine_api module

@author: Yuhao Cheng @contact: yuhao.cheng[at]outlook.com

class pyanomaly.core.engine.engine_api.EngineAPI(cfg, is_training)

Bases: object

The API class to get engines which are used in training or inference process

build()

The method to produce the engine Args:

None

Returns:

engine: The Engine class which is used for training or inference

pyanomaly.core.engine.engine_registry module

@author: Yuhao Cheng @contact: yuhao.cheng[at]outlook.com

pyanomaly.core.engine.utils module

@author: Yuhao Cheng @contact: yuhao.cheng[at]outlook.com

class pyanomaly.core.engine.utils.EngineAverageMeter

Bases: object

Computes and store the average the current value

update(val, n=1)
pyanomaly.core.engine.utils.engine_save_checkpoint(cfg, cfg_name, model, epoch, loss, optimizer, logger, time_stamp, metric, flag='inter', verbose='None', best=False)

Save the checkpoint of training, in order to resume the training process Args:

flag: if the cheeckpoint is final, the value of it is 'final'. else, the value of it is 'inter'

pyanomaly.core.engine.utils.engine_save_model(cfg, cfg_name, model, logger, time_stamp, metric, verbose='None', best=False)

Save the final model of training

Module contents