Skip to content

Commit

Permalink
refac(train): exploit additional concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
rouson committed Dec 17, 2023
1 parent 8e94172 commit f34f467
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inference_engine/trainable_engine_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
real, parameter :: epsilon = real(1.D-08,rkind)

adjust_weights_and_biases: &
do l = 1,output_layer
do concurrent(l = 1:output_layer)
dcdw(1:n(l),1:n(l-1),l) = dcdw(1:n(l),1:n(l-1),l)/(mini_batch_size)
vdw(1:n(l),1:n(l-1),l) = beta(1)*vdw(1:n(l),1:n(l-1),l) + obeta(1)*dcdw(1:n(l),1:n(l-1),l)
sdw (1:n(l),1:n(l-1),l) = beta(2)*sdw(1:n(l),1:n(l-1),l) + obeta(2)*(dcdw(1:n(l),1:n(l-1),l)**2)
Expand All @@ -205,7 +205,7 @@
end block
else
adjust_weights_and_biases: &
do l = 1,output_layer
do concurrent(l = 1:output_layer)
dcdb(1:n(l),l) = dcdb(1:n(l),l)/mini_batch_size
b(1:n(l),l) = b(1:n(l),l) - eta*dcdb(1:n(l),l) ! Adjust biases
dcdw(1:n(l),1:n(l-1),l) = dcdw(1:n(l),1:n(l-1),l)/mini_batch_size
Expand Down

0 comments on commit f34f467

Please sign in to comment.