Skip to content

Commit 5727921

Browse files
committed
missing module procedure
1 parent 9d7eb7c commit 5727921

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/stdlib_specialfunctions_activations.fypp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ end function
173173
! Softmax
174174
!==================================================
175175
#:for rk, rt in REAL_KINDS_TYPES
176-
pure function Softmax_r1_${rk}$( x ) result( y )
176+
pure module function Softmax_r1_${rk}$( x ) result( y )
177177
${rt}$, intent(in) :: x(:)
178178
${rt}$ :: y(size(x))
179179

180180
y = exp(x - maxval(x))
181181
y = y / sum(y)
182182
end function
183183

184-
pure function Softmax_r2_${rk}$( x , dim ) result( y )
184+
pure module function Softmax_r2_${rk}$( x , dim ) result( y )
185185
${rt}$, intent(in) :: x(:,:)
186186
${rt}$ :: y(size(x,dim=1),size(x,dim=2))
187187

@@ -201,7 +201,7 @@ pure function Softmax_r2_${rk}$( x , dim ) result( y )
201201
end if
202202
end function
203203

204-
pure function Softmax_r3_${rk}$( x , dim ) result( y )
204+
pure module function Softmax_r3_${rk}$( x , dim ) result( y )
205205
${rt}$, intent(in) :: x(:,:,:)
206206
${rt}$ :: y(size(x,dim=1),size(x,dim=2),size(x,dim=3))
207207

@@ -221,7 +221,7 @@ pure function Softmax_r3_${rk}$( x , dim ) result( y )
221221
end if
222222
end function
223223

224-
pure function Softmax_r4_${rk}$( x , dim ) result( y )
224+
pure module function Softmax_r4_${rk}$( x , dim ) result( y )
225225
${rt}$, intent(in) :: x(:,:,:,:)
226226
${rt}$ :: y(size(x,dim=1),size(x,dim=2),size(x,dim=3),size(x,dim=4))
227227

@@ -241,15 +241,15 @@ pure function Softmax_r4_${rk}$( x , dim ) result( y )
241241
end if
242242
end function
243243

244-
pure function Softmax_grad_r1_${rk}$( x ) result( y )
244+
pure module function Softmax_grad_r1_${rk}$( x ) result( y )
245245
${rt}$, intent(in) :: x(:)
246246
${rt}$ :: y(size(x))
247247

248248
y = Softmax(x)
249249
y = y * (1._${rk}$ - y)
250250
end function
251251

252-
pure function Softmax_grad_r2_${rk}$( x , dim ) result( y )
252+
pure module function Softmax_grad_r2_${rk}$( x , dim ) result( y )
253253
${rt}$, intent(in) :: x(:,:)
254254
${rt}$ :: y(size(x,dim=1),size(x,dim=2))
255255

@@ -262,7 +262,7 @@ pure function Softmax_grad_r2_${rk}$( x , dim ) result( y )
262262
y = y * (1._${rk}$ - y)
263263
end function
264264

265-
pure function Softmax_grad_r3_${rk}$( x , dim ) result( y )
265+
pure module function Softmax_grad_r3_${rk}$( x , dim ) result( y )
266266
${rt}$, intent(in) :: x(:,:,:)
267267
${rt}$ :: y(size(x,dim=1),size(x,dim=2),size(x,dim=3))
268268

@@ -275,7 +275,7 @@ pure function Softmax_grad_r3_${rk}$( x , dim ) result( y )
275275
y = y * (1._${rk}$ - y)
276276
end function
277277

278-
pure function Softmax_grad_r4_${rk}$( x , dim ) result( y )
278+
pure module function Softmax_grad_r4_${rk}$( x , dim ) result( y )
279279
${rt}$, intent(in) :: x(:,:,:,:)
280280
${rt}$ :: y(size(x,dim=1),size(x,dim=2),size(x,dim=3),size(x,dim=4))
281281

0 commit comments

Comments
 (0)