Hello,
When I run the demo, I get the following error while initializing the GameStatusClassifier:
ERROR: Failed to load game state classification model:
size mismatch for bias: copying a param with shape torch.Size([3]) from checkpoint,
the shape in current model is torch.Size([2])
It looks like the checkpoint is trained for 3 classes (play, no-play, service), but the model is being initialized with 2 classes by default.
I suggest updating the _load_model method to explicitly set num_labels to match the checkpoint, for example:
from transformers import VideoMAEConfig, VideoMAEForVideoClassification
config = VideoMAEConfig.from_pretrained(model_path)
config.num_labels = 3 # Match checkpoint
model = VideoMAEForVideoClassification.from_pretrained(
model_path,
config=config,
dtype=torch.float16
)
This should resolve the size mismatch error.
Could you clarify if the repository intends the game state classifier to always be 3-class, or if there is a separate 2-class checkpoint available?
Thanks!