The application discloses a high-efficiency
local learning system supporting an arbitrary
network topology, which is applied to various
local learning tasks and is realized by an electronic device with computing capability and comprises the following modules: an rlayer module, a datasets module, a grads module, a
metrics module and an optimizer module; operator classes, gradient solving classes, optimizer classes, dataset classes and measurement index functions in an operator layer are used for providing interfaces of the modules in the module layer; the operator classes, the dataset download and preprocessing classes, the optimizer classes, the gradient derivation classes and the index calculation functions in the module layer all have input and output interfaces, a user can create and instantiate a
network on demand through the rlayer module, download and preprocess a dataset through the datasets module, select a corresponding optimizer through the optimizer module, select a
local learning gradient derivation class through the grads module, select a loss and precision calculation function through the
metrics module, complete initialization of the network and corresponding hyperparameters, and realize network training and testing.