Skip to content

Commit

Permalink
Disable multiprocess for Windows. Closes #15.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou13 committed Jan 10, 2020
1 parent 0082f17 commit eccf0e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion process.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import threading
import subprocess

import yaml
import numpy as np
import torch
import matplotlib as mpl
Expand Down Expand Up @@ -85,7 +86,7 @@ def main():
shuffle=False,
batch_size=M.batch_size,
collate_fn=collate,
num_workers=C.io.num_workers,
num_workers=C.io.num_workers if os.name != "nt" else 0,
pin_memory=True,
)
os.makedirs(args["<output-dir>"], exist_ok=True)
Expand Down
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def main():
datadir = C.io.datadir
kwargs = {
"collate_fn": collate,
"num_workers": C.io.num_workers,
"num_workers": C.io.num_workers if os.name != "nt" else 0,
"pin_memory": True,
}
train_loader = torch.utils.data.DataLoader(
Expand Down

0 comments on commit eccf0e4

Please sign in to comment.