STCN
STCN copied to clipboard
如何测试stcn的FLOPs
您好,我想用torchstat测试一下stcn的FLOPs,但是不知道如图下面所示的model和data应该怎么输入?加入我要测试youtube时同时打印stcn的FLOPs,应该把哪一行的data和model作为stat的输入?谢谢

I don't think you can simply do that. STCN needs multiple forward passes and those depend on a growing memory bank. One possible way is to compute the FLOPs for the key/value encoders/decoder independently, and manually compute the FLOPs required for a memory readout as a function of the memory size. Then you can add them up. The total FLOPs would be dependent on video length, etc.
我不认为你可以简单地做到这一点。STCN 需要多次前向传递,而这些都依赖于不断增长的内存库。一种可能的方法是独立计算键/值编码器/解码器的 FLOP,并根据内存大小手动计算内存读出所需的 FLOP。然后你可以把它们加起来。总 FLOP 将取决于视频长度等。
是的,我们尝试了很多办法和很多包去算STCN 的FLOPs,但是都没有成功,主要感觉STCN模型有多个输入,不像resnet输入只有data.
@longmalongma 您好,看到您之前在https://github.com/haochenheheda/Training-Code-of-STM中有过提问,我想请教一下您,在 Fs, Ms, num_objects, info = next(loader_iter1)中,loader_iter1是Davis17数据集,其中Fs torch.Size([1, 3, 3, 384, 384]) (即[bacth_size,T,C,H,W])其中这个T代表什么呢? Ms torch.Size([1, 11, 3, 384, 384]) (即[bacth_size,K,C,H,W])其中这个K代表什么呢(是最大的分类数么)?【因为代码中的一些切片操作并未明白是做什么的,比如:Fs[:, :, 0]. Ms[:, :, 0] 这是对第一帧图片进行操作么?】 真心期待您的回复!