Closed 1802931263 closed 5 months ago
源代码中的断言是这样的, assert inputs[0].debugName().startswith("xs") # (B, D, L) assert inputs[1].debugName().startswith("dts") # (B, D, L) assert inputs[2].debugName().startswith("As") # (D, N) assert inputs[3].debugName().startswith("Bs") # (D, N) assert inputs[4].debugName().startswith("Cs") # (D, N) 但是输出的inputs确实这样的, input params: u.1 delta.1 A.1 B.1 C.1 D.1 delta_bias.1 从而导致程序运行终止。 错误提示: Traceback (most recent call last): File "main.py", line 407, in main(config) File "main.py", line 122, in main flops = model.flops() File "/root/autodl-tmp/ResVMamba/models/resvmamba.py", line 1118, in flops Gflops, unsupported = flop_count(model=model, inputs=(input,), supported_ops=supported_ops) File "/root/miniconda3/lib/python3.8/site-packages/fvcore/nn/flop_count.py", line 147, in flop_count for op, flop in flop_counter.by_operator().items(): File "/root/miniconda3/lib/python3.8/site-packages/fvcore/nn/jit_analysis.py", line 265, in by_operator stats = self._analyze() File "/root/miniconda3/lib/python3.8/site-packages/fvcore/nn/jit_analysis.py", line 584, in _analyze op_counts = self._op_handles[kind](inputs, outputs) File "/root/autodl-tmp/ResVMamba/models/resvmamba.py", line 348, in selective_scan_flop_jit assert inputs[0].debugName().startswith("xs") # (B, D, L) AssertionError
Hi @1802931263 , maybe is the problem of fvcore version, I have not meet that error
感谢您的回答,问题已经解决了!
你好 请问你是如何解决的 我碰到了同样的问题
源代码中的断言是这样的, assert inputs[0].debugName().startswith("xs") # (B, D, L) assert inputs[1].debugName().startswith("dts") # (B, D, L) assert inputs[2].debugName().startswith("As") # (D, N) assert inputs[3].debugName().startswith("Bs") # (D, N) assert inputs[4].debugName().startswith("Cs") # (D, N) 但是输出的inputs确实这样的, input params: u.1 delta.1 A.1 B.1 C.1 D.1 delta_bias.1 从而导致程序运行终止。 错误提示: Traceback (most recent call last): File "main.py", line 407, in
main(config)
File "main.py", line 122, in main
flops = model.flops()
File "/root/autodl-tmp/ResVMamba/models/resvmamba.py", line 1118, in flops
Gflops, unsupported = flop_count(model=model, inputs=(input,), supported_ops=supported_ops)
File "/root/miniconda3/lib/python3.8/site-packages/fvcore/nn/flop_count.py", line 147, in flop_count
for op, flop in flop_counter.by_operator().items():
File "/root/miniconda3/lib/python3.8/site-packages/fvcore/nn/jit_analysis.py", line 265, in by_operator
stats = self._analyze()
File "/root/miniconda3/lib/python3.8/site-packages/fvcore/nn/jit_analysis.py", line 584, in _analyze
op_counts = self._op_handles[kind](inputs, outputs)
File "/root/autodl-tmp/ResVMamba/models/resvmamba.py", line 348, in selective_scan_flop_jit
assert inputs[0].debugName().startswith("xs") # (B, D, L)
AssertionError