Skip to content

Commit

Permalink
Disable second image with same query
Browse files Browse the repository at this point in the history
  • Loading branch information
jloveric committed May 22, 2024
1 parent bc62a2f commit 8528be8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions high_order_implicit_representation/single_image_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,11 @@ def data_generator(self):
arr = np.copy(np.asarray(img))
yield caption, torch.from_numpy(arr)

jpg_1 = row["jpg_1"]
img = Image.open(io.BytesIO(jpg_1))
arr = np.copy(np.asarray(img))
yield caption, torch.from_numpy(arr)
# I don't want the same caption twice
#jpg_1 = row["jpg_1"]
#img = Image.open(io.BytesIO(jpg_1))
#arr = np.copy(np.asarray(img))
#yield caption, torch.from_numpy(arr)

def __call__(self):
return self.data_generator()
Expand Down

0 comments on commit 8528be8

Please sign in to comment.