Broadcasts network weights and biases from specified image to all others.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(network_type), | intent(inout) | :: | self | |||
| integer(kind=ik), | intent(in) | :: | image |
subroutine sync(self, image)
!! Broadcasts network weights and biases from
!! specified image to all others.
class(network_type), intent(in out) :: self
integer(ik), intent(in) :: image
integer(ik) :: n
if (num_images() == 1) return
layers: do n = 1, size(self % dims)
#ifdef CAF
call co_broadcast(self % layers(n) % b, image)
call co_broadcast(self % layers(n) % w, image)
#endif
end do layers
end subroutine sync