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

Commit

Permalink
update xrmb
Browse files Browse the repository at this point in the history
  • Loading branch information
jameschapman19 committed Sep 3, 2022
1 parent d0c8372 commit 4d93055
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion multiviewdata/torchdatasets/mediamill.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def convert_target(target_str):

train_file, valid_file, test_file = [os.path.join(root, 'mediamill_' + ds + '.libsvm') for ds in
['train', 'valid', 'test']]
print()

@property
def raw_folder(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion multiviewdata/torchdatasets/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def raw_folder(self) -> str:
return os.path.join(self.root, self.__class__.__name__, "raw")

def __getitem__(self, index):
batch = {"index": index.astype(np.float32)}
batch = {"index": index}
batch["userid"] = self.ids[index].astype(np.float32)
batch["views"] = [view[index].astype(np.float32) for view in self.views]
return batch
Expand Down
2 changes: 1 addition & 1 deletion multiviewdata/torchdatasets/wiw.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __len__(self):
return len(self.dataset)

def __getitem__(self, index):
batch = {"index": index.astype(np.float32)}
batch = {"index": index}
batch["views"] = [
self.dataset["%06d" % index][feat + "_feats"][()].astype(np.float32)
for feat in self.feats
Expand Down
2 changes: 1 addition & 1 deletion multiviewdata/torchdatasets/xrmb.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __getitem__(self, index):
self.dataset["view_1"][index].astype(np.float32),
self.dataset["view_2"][index].astype(np.float32),
),
"index": index.astype(np.float32),
"index": index,
}

def _check_exists(self) -> bool:
Expand Down

0 comments on commit 4d93055

Please sign in to comment.