Skip to content

Commit

Permalink
Update BaseDataPipe.py
Browse files Browse the repository at this point in the history
make only train and test pipes include RandomLocation
  • Loading branch information
rhoadesScholar authored Sep 5, 2023
1 parent 94cf386 commit 3a65557
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/raygun/io/BaseDataPipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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.")

Expand Down

0 comments on commit 3a65557

Please sign in to comment.