Update old existing feature extractor references (#24552)
* Update old existing feature extractor references * Typo * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Address comments from review - update 'feature extractor' Co-authored by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -37,7 +37,7 @@ if is_torch_available():
|
||||
if is_vision_available():
|
||||
from PIL import Image
|
||||
|
||||
from transformers import PoolFormerFeatureExtractor
|
||||
from transformers import PoolFormerImageProcessor
|
||||
|
||||
|
||||
class PoolFormerConfigTester(ConfigTester):
|
||||
@@ -237,10 +237,10 @@ def prepare_img():
|
||||
class PoolFormerModelIntegrationTest(unittest.TestCase):
|
||||
@slow
|
||||
def test_inference_image_classification_head(self):
|
||||
feature_extractor = PoolFormerFeatureExtractor()
|
||||
image_processor = PoolFormerImageProcessor()
|
||||
model = PoolFormerForImageClassification.from_pretrained("sail/poolformer_s12").to(torch_device)
|
||||
|
||||
inputs = feature_extractor(images=prepare_img(), return_tensors="pt").to(torch_device)
|
||||
inputs = image_processor(images=prepare_img(), return_tensors="pt").to(torch_device)
|
||||
|
||||
# forward pass
|
||||
with torch.no_grad():
|
||||
|
||||
Reference in New Issue
Block a user