Loading caption_lib/lstm/Validators/coco_validator.py +2 −7 Original line number Diff line number Diff line Loading @@ -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) Loading Loading
caption_lib/lstm/Validators/coco_validator.py +2 −7 Original line number Diff line number Diff line Loading @@ -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) Loading