From daf01a871ed13cf68b1fb55be74d916d11a0e6ed Mon Sep 17 00:00:00 2001 From: zjkjzj Date: Thu, 29 Oct 2020 20:26:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(data):=20clip=5Flen=E4=B8=BA=E5=A4=9A?= =?UTF-8?q?=E5=B8=A7=E6=97=B6=E4=B8=8B=E6=A0=87=E8=B6=85=E8=BF=87=E5=9B=BE?= =?UTF-8?q?=E5=83=8F=E6=95=B0=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsn/data/datasets/clipsample/seg_sample.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsn/data/datasets/clipsample/seg_sample.py b/tsn/data/datasets/clipsample/seg_sample.py index e053444..c843f1e 100644 --- a/tsn/data/datasets/clipsample/seg_sample.py +++ b/tsn/data/datasets/clipsample/seg_sample.py @@ -48,7 +48,8 @@ def _get_train_clips(self, num_frames): np.ndarray: Sampled frame indices in train mode. """ one_clip_len = self.clip_len * self.frame_interval - avg_interval = (num_frames - one_clip_len + 1) // self.num_clips + # avg_interval = (num_frames - one_clip_len + 1) // self.num_clips + avg_interval = (num_frames - one_clip_len) // self.num_clips if avg_interval > 0: base_offsets = np.arange(self.num_clips) * avg_interval