@@ -596,11 +596,10 @@ module subroutine train(self, input_data, output_data, batch_size, &
596
596
integer , intent (in ) :: epochs
597
597
class(optimizer_base_type), intent (in ), optional :: optimizer
598
598
class(loss_type), intent (in ), optional :: loss
599
- class(optimizer_base_type), allocatable :: optimizer_
600
599
601
600
real :: pos
602
601
integer :: dataset_size
603
- integer :: batch_start, batch_end
602
+ integer :: batch_start
604
603
integer :: i, j, n
605
604
integer :: istart, iend, indices(2 )
606
605
@@ -630,11 +629,9 @@ module subroutine train(self, input_data, output_data, batch_size, &
630
629
! Pull a random mini-batch from the dataset
631
630
call random_number (pos)
632
631
batch_start = int (pos * (dataset_size - batch_size + 1 )) + 1
633
- batch_end = batch_start + batch_size - 1
634
632
635
633
! FIXME shuffle in a way that doesn't require co_broadcast
636
634
call co_broadcast(batch_start, 1 )
637
- call co_broadcast(batch_end, 1 )
638
635
639
636
! Distribute the batch in nearly equal pieces to all images
640
637
indices = tile_indices(batch_size)
@@ -658,7 +655,6 @@ module subroutine update(self, optimizer, batch_size)
658
655
class(network), intent (in out ) :: self
659
656
class(optimizer_base_type), intent (in ), optional :: optimizer
660
657
integer , intent (in ), optional :: batch_size
661
- class(optimizer_base_type), allocatable :: optimizer_
662
658
integer :: batch_size_
663
659
real , allocatable :: params(:)
664
660
integer :: n
0 commit comments