From 3a65557d4cb61210e308f42e87c52f7fb8c478b7 Mon Sep 17 00:00:00 2001 From: Jeff Rhoades <37990507+rhoadesScholar@users.noreply.github.com> Date: Tue, 5 Sep 2023 15:31:43 -0400 Subject: [PATCH] Update BaseDataPipe.py make only train and test pipes include RandomLocation --- src/raygun/io/BaseDataPipe.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/raygun/io/BaseDataPipe.py b/src/raygun/io/BaseDataPipe.py index 97ed2876..1e2f7845 100644 --- a/src/raygun/io/BaseDataPipe.py +++ b/src/raygun/io/BaseDataPipe.py @@ -28,9 +28,10 @@ def get_source(self, path, src_names, src_specs=None): def prenet_pipe(self, mode: str = "train"): # Make pre-net datapipe - prenet_pipe = self.source + gp.RandomLocation() + prenet_pipe = self.source if mode == "train": sections = [ + gp.RandomLocation(), "reject", "resample", "preprocess", @@ -41,7 +42,7 @@ def prenet_pipe(self, mode: str = "train"): elif mode == "predict": sections = ["reject", "resample", "preprocess", "unsqueeze", "stack"] elif mode == "test": - sections = ["reject", "resample", "preprocess", "unsqueeze", gp.Stack(1)] + sections = [gp.RandomLocation(), "reject", "resample", "preprocess", "unsqueeze", gp.Stack(1)] else: raise ValueError(f"mode={mode} not implemented.")