Skip to content

Commit 114e025

Browse files
author
Lisa Dunlap
committed
added domainnet splits
1 parent 725df6f commit 114e025

File tree

9 files changed

+45981
-2
lines changed

9 files changed

+45981
-2
lines changed

datasets/domain_net.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def __getitem__(self, idx):
5050

5151
MINI_DOMAINS = ['clipart', 'painting', 'real', 'sketch']
5252

53-
with open(f'/shared/lisabdunlap/data/domainnet_sentry_split/real_test_mini.txt') as f:
53+
with open(f'domainnet_sentry_split/real_test_mini.txt') as f:
5454
test_classes = f.read().splitlines()
5555

5656
class_dict = {}
@@ -64,7 +64,7 @@ class OneDomain:
6464
def __init__(self, root: str, domain: str, split: str, transform):
6565
assert domain in ['clipart', 'painting', 'real', 'sketch'], 'domain must be one of clipart, real, painting, sketch'
6666
name = "train" if split == 'train' else "test"
67-
labels_file = os.path.join(root, "domainnet_sentry_split", f"{domain}_{name}_mini.txt")
67+
labels_file = os.path.join("domainnet_sentry_split", f"{domain}_{name}_mini.txt")
6868
img_dir = os.path.join(root, "domainnet")
6969
with open(labels_file) as f:
7070
content = [line.rstrip().split(" ") for line in f]

0 commit comments

Comments
 (0)