Deep-Reinforcement-Learning-with-Python icon indicating copy to clipboard operation
Deep-Reinforcement-Learning-with-Python copied to clipboard

Basic doubt in exercise chapter 10

Open ghost opened this issue 2 years ago • 0 comments

Dear all,

I am new to RL and tensorflow and, while replicating the exercise of the Cart Pole Balance with Policy Methods, a doubt arouse regarding the specification of layer 2. The code says:

layer2 = tf.layers.dense(layer1, units=num_actions)
prob_dist = tf.nn.softmax(layer2)

I wonder why the softmax function is not passed as 3rd argument to the tf.layers.dense() command.

Apologies if this query is too basic, but recieving some feedback would be highly appreciated.

ghost avatar Jan 26 '24 16:01 ghost