Skip to content

Commit 5d0419e

Browse files
committed
homogenize arguments
1 parent 1a2245a commit 5d0419e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/stdlib_specialfunctions.fypp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,10 @@ module stdlib_specialfunctions
293293
!!
294294
!! Gradient of the softmax function. Available for ranks 1 to 4
295295
#:for rk, rt in REAL_KINDS_TYPES
296-
pure module function Softmax_grad_r1_${rk}$( x ) result( y )
296+
pure module function Softmax_grad_r1_${rk}$( x , dim ) result( y )
297297
${rt}$, intent(in) :: x(:)
298298
${rt}$ :: y(size(x))
299+
integer, intent(in), optional :: dim
299300
end function
300301
#:for rank in RANKS
301302
pure module function Softmax_grad_r${rank}$_${rk}$( x , dim ) result( y )

src/stdlib_specialfunctions_activations.fypp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,10 @@ pure module function Softmax_r${rank}$_${rk}$( x , dim ) result( y )
232232
end function
233233
#:endfor
234234

235-
pure module function Softmax_grad_r1_${rk}$( x ) result( y )
235+
pure module function Softmax_grad_r1_${rk}$( x , dim ) result( y )
236236
${rt}$, intent(in) :: x(:)
237237
${rt}$ :: y(size(x))
238+
integer, intent(in), optional :: dim
238239

239240
y = Softmax(x)
240241
y = y * (1._${rk}$ - y)

0 commit comments

Comments
 (0)