VizDoom-Keras-RL icon indicating copy to clipboard operation
VizDoom-Keras-RL copied to clipboard

How to understand the following Lambda sentence in dueling_dqn?

Open forhonourlx opened this issue 7 years ago • 0 comments

Hi Felix,

I am a beginner who learning your code. Could you please kindly tell me how to understand the following Lambda sentence? Thanks for your help.

def dueling_dqn(input_shape, action_size, learning_rate): ... state_value = Lambda(lambda s: K.expand_dims(s[:, 0], dim=-1), output_shape=(action_size,))(state_value) ... action_advantage = Lambda(lambda a: a[:, :] - K.mean(a[:, :], keepdims=True), output_shape=(action_size,))(action_advantage)

forhonourlx avatar Dec 14 '17 15:12 forhonourlx