Open aonihao1 opened 7 months ago
I also have the same problem as you. Can you let me know if you have solved it? Also, there is a problem with my 1.0.0 version loss image and the top 1 image that cannot be produced. Do you know how to solve it
我和你也有同样的问题。如果你已经解决了,你能告诉我吗?另外,我的 1.0.0 版本丢失映像和无法生成的前 1 个映像存在问题。你知道怎么解决吗 I haven't solved it yet,
我和你也有同样的问题。如果你已经解决了,你能告诉我吗?另外,我的 1.0.0 版本丢失映像和无法生成的前 1 个映像存在问题。你知道怎么解决吗 I haven't solved it yet, The graph can be drawn in terms of log
Branch
main branch (1.x version, such as
v1.0.0
, ordev-1.x
branch)Prerequisite
Environment
python 3.9.13 pytorch 1.12.1
Describe the bug
Traceback (most recent call last): File "F:\opensjj\mmaction2-main\tools\analysis_tools\get_flops.py", line 72, in
main()
File "F:\opensjj\mmaction2-main\tools\analysis_tools\get_flops.py", line 58, in main
analysis_results = get_model_complexity_info(model, input_shape)
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\mmengine\analysis\print_helper.py", line 748, in get_model_complexity_info
flops = flop_handler.total()
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\mmengine\analysis\jit_analysis.py", line 268, in total
stats = self._analyze()
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\mmengine\analysis\jit_analysis.py", line 570, in _analyze
graph = _get_scoped_trace_graph(self._model, self._inputs,
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\mmengine\analysis\jit_analysis.py", line 194, in _get_scoped_tracegraph
graph, = _get_trace_graph(module, inputs)
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\torch\jit_trace.py", line 1175, in _get_trace_graph
outs = ONNXTracedModule(f, strict, _force_outplace, return_inputs, _return_inputs_states)(*args, kwargs)
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, kwargs)
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\torch\jit_trace.py", line 127, in forward
graph, out = torch._C._create_graph_by_tracing(
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\torch\jit_trace.py", line 118, in wrapper
outs.append(self.inner(trace_inputs))
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1148, in _call_impl
result = forward_call(input, kwargs)
File "C:\Users\YA\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1118, in _slow_forward
result = self.forward(*input, kwargs)
File "F:\opensjj\mmaction2-main\mmaction\models\recognizers\recognizer3d_mm.py", line 37, in extract_feat
for m, m_data in inputs.items():
AttributeError: 'Tensor' object has no attribute 'items'
Reproduces the problem - code sample
import argparse
from mmengine import Config from mmengine.registry import init_default_scope
from mmaction.registry import MODELS
try: from mmengine.analysis import get_model_complexity_info except ImportError: raise ImportError('Please upgrade mmcv to >0.6.2')
def parse_args(): parser = argparse.ArgumentParser(description='Get model flops and params') parser.add_argument('config', help='config file path') parser.add_argument( '--shape', type=int, nargs='+', default=[12,3,8,224,224], help='input image size') args = parser.parse_args() return args
def main():
if name == 'main': main()
Reproduces the problem - command or script
No response
Reproduces the problem - error message
No response
Additional information
Here is another question, if we want to analyze the number of parameters and calculations of rgbposec3d, what should be filled here? “default=[12,3,8,224,224],” Here is another question, if we want to analyze the number of parameters and calculations of rgb_only, what should be filled here?