Python, Data Science, AI, NLP, Programming.
ViTFeatureExtractor.from_pretrained('google/vit-base-patch16–224') model = ViTForImageClassification.from_pretrained('google/vit-base-patch16–224') inputs = feature_extractor(images=image, return_tensors="pt") outputs = model(**inputs) logits = outputs.logits # model predicts one of the 1000