brainspy.algorithms.ga#

File containing the genetic algorithm methods and the optimizer class for training a single DNPU.

Functions

evaluate_population(inputs, targets, pool, ...)

Given a particular genome pool, containing all possible control voltage solutions of a genetic algorithm, it evaluates on the DNPU model/hardware the fitness for those solutions.

train(model, dataloaders, criterion, ...[, ...])

Main training loop for the genetic algorithm.

Classes

GeneticOptimizer(gene_ranges, partition, epochs)

A class for implementing a genetic algorithm optimisation solution for training DNPUs on and off chip, in a way that resembles a PyTorch optimizer.