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

Commit

Permalink
b
Browse files Browse the repository at this point in the history
  • Loading branch information
jameschapman19 committed May 10, 2023
1 parent 4d93055 commit d317829
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions multiviewdata/torchdatasets/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def __len__(self):

def __getitem__(self, idx):
x_a, label = self.dataset[idx]
x_b = x_a[:, :, 14:]
x_a = x_a[:, :, :14]
x_b = x_a[:, :, 14:]/255.
x_a = x_a[:, :, :14]/255.
if self.flatten:
x_a = torch.flatten(x_a)
x_b = torch.flatten(x_b)
Expand Down Expand Up @@ -154,7 +154,9 @@ def load_mnist(mnist_type, train, root, download):
train=train,
download=download,
transform=torchvision.transforms.Compose(
[torchvision.transforms.ToTensor()]
[
torchvision.transforms.ToTensor(),
]
),
)

Expand Down

0 comments on commit d317829

Please sign in to comment.