Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
added .csv image loading utils
Browse files Browse the repository at this point in the history
  • Loading branch information
williamFalcon committed Feb 14, 2021
1 parent b8b52e3 commit f435f8f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions flash/vision/classification/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,11 @@ def from_filepaths(
full_length = len(train_ds)
train_split = int((1.0 - valid_split) * full_length)
valid_split = full_length - train_split
train_ds, valid_ds = torch.utils.data.random_split(train_ds,
[train_split, valid_split],
generator=torch.Generator().manual_seed(seed))
train_ds, valid_ds = torch.utils.data.random_split(
train_ds,
[train_split, valid_split],
generator=torch.Generator().manual_seed(seed)
)
else:
valid_ds = (
FilepathDataset(
Expand Down

0 comments on commit f435f8f

Please sign in to comment.