December 2019
Intermediate to advanced
368 pages
11h 10m
English
The following source code implements ANN parameter estimations, as defined by the formula from the previous section (see the compute_weights_from_seeds function):
idx = seeds[0] theta = noise.get(idx, self.num_params).copy() * self.scale_by for mutation in seeds[1:]: idx, power = mutation theta = self.compute_mutation(noise, theta, idx, power) return theta
The compute_mutation function implements an estimation of the single step of the ANN parameter estimation, as follows:
def compute_mutation(self, noise, parent_theta, idx, mutation_power): return parent_theta + mutation_power * noise.get(idx, self.num_params)
The preceding code takes the vector of the parent's trainable parameters and adds to it ...
Read now
Unlock full access