Commit 32608707 authored by Rudolf Chrispens's avatar Rudolf Chrispens
Browse files

fix 3

parent e45802ab
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -144,18 +144,13 @@ class coco_validator(object):

            if save_sampled_captions:
                num_iter = int(np.ceil(features.shape[0] / self.batch_size)) - self.batch_size
                all_sam_cap = np.ndarray((int(np.ceil(features.shape[0] / self.batch_size)), 20))
                all_sam_cap = np.ndarray((features.shape[0], 20))
                print("all_sam_cap.shape: ", all_sam_cap.shape)

                if _config.validator.max_iteration != -1:
                    num_iter = _config.validator.max_iteration

                if num_iter > self.batch_size:
                    counter = np.foor(num_iter / self.batch_size)
                else:
                    counter = num_iter

                for i in range(counter):
                for i in range(num_iter):
                    left_side = int(i * self.batch_size)
                    right_side = int((i + 1) * self.batch_size)