Update README.md
Browse files
README.md
CHANGED
@@ -26,10 +26,10 @@ import torch
|
|
26 |
|
27 |
video = list(np.random.randn(8, 3, 224, 224))
|
28 |
|
29 |
-
|
30 |
model = TimesformerForVideoClassification.from_pretrained("facebook/timesformer-base-finetuned-k400")
|
31 |
|
32 |
-
inputs =
|
33 |
|
34 |
with torch.no_grad():
|
35 |
outputs = model(**inputs)
|
|
|
26 |
|
27 |
video = list(np.random.randn(8, 3, 224, 224))
|
28 |
|
29 |
+
processor = AutoImageProcessor.from_pretrained("facebook/timesformer-base-finetuned-k400")
|
30 |
model = TimesformerForVideoClassification.from_pretrained("facebook/timesformer-base-finetuned-k400")
|
31 |
|
32 |
+
inputs = processor(video, return_tensors="pt")
|
33 |
|
34 |
with torch.no_grad():
|
35 |
outputs = model(**inputs)
|