Removal of deprecated vision methods and specify deprecation versions (#24570)

* Removal of deprecated methods and specify versions

* Fix tests
This commit is contained in:
amyeroberts
2023-06-29 15:09:51 +01:00
committed by GitHub
parent 77db28dc52
commit b324557aac
32 changed files with 144 additions and 760 deletions

View File

@@ -305,7 +305,7 @@ to indicate which pixels are real (1) and which are padding (0).
```py
>>> def collate_fn(batch):
... pixel_values = [item["pixel_values"] for item in batch]
... encoding = image_processor.pad_and_create_pixel_mask(pixel_values, return_tensors="pt")
... encoding = image_processor.pad(pixel_values, return_tensors="pt")
... labels = [item["labels"] for item in batch]
... batch = {}
... batch["pixel_values"] = encoding["pixel_values"]