Skip to content

Commit cd2545c

Browse files
authored
Update naf2_new.py
1 parent 0e5c130 commit cd2545c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

naf2_new.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ def __init__(self, obs_dim=2, act_dim=2, **kwargs):
185185
h = self.fc(h, hidden_dim, kernel_initializer=self.kernel_initializer)
186186

187187
# Output - state-value function, where the reward is assumed to be negative
188-
V = tf.scalar_mul(-1, self.fc(h, 1, activation=tf.nn.leaky_relu,
189-
kernel_initializer=self.kernel_initializer, name='V'))
188+
V = -self.fc(h, 1, activation=tf.nn.leaky_relu,
189+
kernel_initializer=self.kernel_initializer, name='V')
190190
# Output - for the matrix L
191191
l = self.fc(h, (self.act_dim * (self.act_dim + 1) / 2),
192192
kernel_initializer=self.kernel_initializer, name='l')

0 commit comments

Comments
 (0)