October 2018
Intermediate to advanced
252 pages
6h 49m
English
The last layer of the network is chosen based on the dueling type chosen and passed to the init function. For example, the following code sets the output layer for the avg dueling type:
if self.dueling_type == 'avg': outputlayer = Lambda(lambda a: K.expand_dims(a[:, 0], -1) + a[:, 1:] - K.mean(a[:, 1:], keepdims=True), output_shape=(nb_action,))(y)