diff --git a/TSM_kinetics_RGB_resnet50_shift8_blockres_avg_segment8_e50.pth b/TSM_kinetics_RGB_resnet50_shift8_blockres_avg_segment8_e50.pth index 24047ce..e5378f2 100644 Binary files a/TSM_kinetics_RGB_resnet50_shift8_blockres_avg_segment8_e50.pth and b/TSM_kinetics_RGB_resnet50_shift8_blockres_avg_segment8_e50.pth differ diff --git a/tsm.py b/tsm.py index cf9de9c..5fc9bd8 100644 --- a/tsm.py +++ b/tsm.py @@ -87,7 +87,7 @@ class Tsm(NNOperator): # Transform video data given configs if self.skip_preprocess: - self.cfg.update(num_frames=None) + self.transform_cfgs.update(num_frames=None) data = transform_video( video=video, @@ -98,7 +98,7 @@ class Tsm(NNOperator): feats = self.model.forward_features(inputs) features = feats.to('cpu').squeeze(0).detach().numpy() - outs = self.model(feats) + outs = self.model.head(feats) post_act = torch.nn.Softmax(dim=1) preds = post_act(outs) pred_scores, pred_classes = preds.topk(k=self.topk)