Skip to content

Commit

Permalink
Let's work with higher-res images then
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanSeriesX committed Nov 1, 2023
1 parent 74e60c0 commit 409e62b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions u2net_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"plain_resized": {
"name": "Plain Images",
"message": "Learning the dataset itself...\n",
"transform": [Resize(512), ToTensorLab()],
"batch_factor": 1,
"transform": [Resize(1024), ToTensorLab()],
"batch_factor": 0.3,
},
"flipped_v": {
"name": "Vertical Flips",
Expand Down Expand Up @@ -367,13 +367,11 @@ def get_dataloader(tra_img_name_list, tra_lbl_name_list, transform, batch_size):
transform=transform,
)

cores = 8
if batch_size == 10:
cores = 2 # freeing up memory a bit
cores = 2 # freeing up memory a bit

# DataLoader for the dataset
dataloader = DataLoader(
dataset, batch_size=batch_size, shuffle=True, num_workers=cores
dataset, batch_size=int(batch_size), shuffle=True, num_workers=cores
)

return dataloader
Expand Down

0 comments on commit 409e62b

Please sign in to comment.