import torch
from timesformer.models.vit import TimeSformer
model = TimeSformer(img_size=224, num_classes=400, num_frames=5, attention_type='divided_space_time', pretrained_model=checkpoint_file)
dummy_video = torch.randn(2, 3, 8, 224, 224) # (batch x channels x frames x height x width)
pred = model(input_video_path,) # (2, 400)
Just crash in notebook.
Just crash in notebook.
While tried in "py" file, I just get "Floating point exception"
I have a video 224x224
According to may break-point debug, I stop at https://github.com/facebookresearch/TimeSformer/blob/main/timesformer/models/vit_utils.py#L47