March 2019
Intermediate to advanced
184 pages
4h 57m
English
The advantagestream object is passed into a fully connected layer with a number of neurons equal to the number of actions, that is, len(self.VALID_ACTIONS). Likewise, the valuestream object is passed into a fully connected layer with one neuron. Note that we do not use an activation function for computing the advantage and state value functions, as they can be positive or negative (relu will set all negative values to zero!). Finally, we combine the advantage and value streams using tf.subtract() to subtract the advantage and the mean of the advantage function. The mean is computed using tf.reduce_mean() on the advantage function:
# A(s,a)self.advantage = tf.contrib.layers.fully_connected(advantagestream, len(self.VALID_ACTIONS), ...
Read now
Unlock full access