Loading caption-lib/lstm/Validators/coco_validator.py +1 −1 Original line number Diff line number Diff line Loading @@ -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] Loading Loading
caption-lib/lstm/Validators/coco_validator.py +1 −1 Original line number Diff line number Diff line Loading @@ -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] Loading