Skip to content

Commit

Permalink
removecomments
Browse files Browse the repository at this point in the history
  • Loading branch information
phi committed Apr 25, 2024
1 parent 4a2a342 commit 1e07818
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -633,13 +633,4 @@ def preprocess(
pixel_values = np.array(pixel_values)
new_images.append(pixel_values)

# max_patch = max(len(x) for x in new_images)
# new_images = [
# np.concatenate([x, np.zeros([max_patch - x.shape[0]] + list(x.shape[1:]), dtype=x.dtype)], axis=0)
# if x.shape[0] < max_patch
# else x
# for x in new_images
# ]
# data = {"pixel_values": new_images, "image_sizes": image_sizes}
# return BatchFeature(data=data, tensor_type=return_tensors)
return self.pad(pixel_values=new_images, image_sizes=image_sizes, return_tensors=return_tensors)

0 comments on commit 1e07818

Please sign in to comment.