Commit 7fe3ce3c authored by Rudolf Chrispens's avatar Rudolf Chrispens
Browse files

fixed overflow of validation set because of rounding

parent be2d687e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ class coco_validator(object):
            """

            if save_sampled_captions:
                num_iter = int(np.floor(features.shape[0] / self.batch_size))
                num_iter = int(np.ceil(features.shape[0] / self.batch_size)) - self.batch_size
                all_sam_cap = np.ndarray((int(np.floor(features.shape[0] / self.batch_size)), 20))
                for i in range(num_iter):
                    features_batch = features[i * self.batch_size:(i + 1) * self.batch_size]