Skip to content

Commit 08b4d12

Browse files
committed
remove notes
1 parent 92633f9 commit 08b4d12

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ngclearn/utils/model_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,12 +590,11 @@ def softmax(x, tau=0.0):
590590
Returns:
591591
a (N x D) probability distribution output block
592592
"""
593-
# TODO: Do we need to also consider for edge case the division of tau by 0 is invalid?
594593
if tau > 0.0:
595594
x = x / tau
596595
max_x = jnp.max(x, axis=1, keepdims=True)
597596
exp_x = jnp.exp(x - max_x)
598-
return exp_x / jnp.sum(exp_x, axis=1, keepdims=True) # TODO: We also have to take care of the case where the sum is 0
597+
return exp_x / jnp.sum(exp_x, axis=1, keepdims=True)
599598

600599
@jit
601600
def threshold_soft(x, lmbda):

0 commit comments

Comments
 (0)