October 2018
Intermediate to advanced
252 pages
6h 49m
English
Boundary seeking loss, as we explained in the section at the start of this recipe, is implemented with the following equation:

Where D(x) is the probability that x came from data rather than pg.
This is the only major change compared to the previous sample. It is implemented in our class with the following function:
import keras.backend as Kdef boundary_loss(self, y_true, y_pred): return 0.5 * K.mean((K.log(y_pred) - K.log(1 - y_pred))**2)
Next, we will look at how to train this network with the training ...