Performs one step of the differential evolution algorithm.
tfp.optimizer.differential_evolution_one_step( objective_function, population, population_values=None, differential_weight=0.5, crossover_prob=0.9, seed=None, name=None )
objective_function: A Python callable that accepts a batch of possible solutions and returns the values of the objective function at those arguments as a rank 1 real
Tensor. This specifies the function to be minimized. The input to this callable may be either a single
Tensoror a Python
Tensors. The signature must match the format of the argument
population. (i.e., objective_function(*population) must return the value of the function to be minimized).
Tensors representing the current population vectors. Each
Tensormust be of the same real dtype. The first dimension indexes individual population members while the rest of the dimensions are consumed by the value function. For example, if the population is a single
Tensorof shape [n, m1, m2], then
nis the population size and the output of
objective_functionapplied to the population is a
Tensorof shape [n]. If the population is a python list of
Tensors then each
Tensorin the list should have the first axis of a common size, say
objective_function(*population)should return a `Tensor of shape [n]. The population must have at least 4 members for the algorithm to work correctly.
Tensorof rank 1 and real dtype. The result of applying
population. If not supplied it is computed using the
objective_function. Default value: None.
differential_weight: Real scalar
Tensor. Must be positive and less than 2.0. The parameter controlling the strength of mutation. Default value: 0.5
crossover_prob: Real scalar
Tensor. Must be between 0 and 1. The probability of recombination per site. Default value: 0.9
intor None. The random seed for this
None, no seed is applied. Default value: None.
name: (Optional) Python str. The name prefixed to the ops created by this function. If not supplied, the default name 'one_step' is used. Default value: None
A sequence containing the following elements (in order):
Tensors of the same structure as the input population. The population at the next generation.
Tensorof same shape and dtype as input
population_values. The function values for the