lucidrains / TimeSformer-pytorch

Implementation of TimeSformer from Facebook AI, a pure attention-based solution for video classification
MIT License
686 stars 86 forks source link

problem in timesformer_pytorch.py #15

Open Weizhongjin opened 3 years ago

Weizhongjin commented 3 years ago

start from line 182 video = rearrange(video, 'b f c (h p1) (w p2) -> b (f h w) (p1 p2 c)', p1 = p, p2 = p) i think this should be video = rearrange(video, 'b f c (hp p1) (wp p2) -> b (f hp wp) (p1 p2 c)', p1 = p, p2 = p)

lucidrains commented 3 years ago

I believe that is equivalent

tcapelle commented 3 years ago

yeah, variables are silent inside this type of expressions. You could call h or z and it doe snot matter.