We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
tool/model/analyze_model.py 分析flops文件问题
### 问题确认 Search before asking

- [X] 我已经查询[历史issue](https://github.com/PaddlePaddle/PaddleSeg/issues)(包括open与closed)，没有发现相似的bug。I have searched the [open and closed issues](https://github.com/PaddlePaddle/PaddleSeg/issues) and found no similar bug report.


### Bug描述 Describe the Bug

在运行tool/model/analyze_model.py出现错误：
AttributeError: 'Config' object has no attribute 'model' 

tool/model/analyze_model.py源码中并没有根据model_cfg实例化出一个具体的model，而在'_dynamic_flops'函数中，
代码不断调用`model.train()`,'model.eval()'等函数

### 复现环境 Environment


platform: Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.31
Python: 3.9.0 (default, Nov 15 2020, 14:28:56) [GCC 7.3.0]
Paddle compiled with cuda: False
GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
PaddleSeg: 2.8.0
PaddlePaddle: 2.4.2
OpenCV: 4.5.5

### Bug描述确认 Bug description confirmation

- [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息，确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.


### 是否愿意提交PR？ Are you willing to submit a PR?

- [ ] 我愿意提交PR！I'd like to help by submitting a PR!

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `tools/model/analyze_model.py`
Content:
```
1 # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 """
15 Analyze the FLOPs and Params of the model.
16 Usually, just call paddle.flops to output the model information.
17 We use this file for output flops clearly.
18 """
19 
20 import argparse
21 import os
22 import sys
23 
24 import paddle
25 import numpy as np
26 
27 from paddleseg.cvlibs import Config
28 from paddleseg.utils import get_sys_env, logger, op_flops_funs
29 from paddle.hapi.dynamic_flops import (count_parameters, register_hooks,
30                                        count_io_info)
31 from paddle.hapi.static_flops import Table
32 
33 
34 def parse_args():
35     parser = argparse.ArgumentParser(description='Model training')
36     parser.add_argument("--config", help="The path of config file.", type=str)
37     parser.add_argument(
38         "--input_shape",
39         nargs='+',
40         type=int,
41         help="Set the input shape, such as --input_shape 1 3 1024 1024",
42         default=[1, 3, 1024, 1024])
43     return parser.parse_args()
44 
45 
46 # For output flops clearly, modify the dynamic_flops function in paddle/hapi/dynamic_flops.py
47 def _dynamic_flops(model, inputs, custom_ops=None, print_detail=False):
48     handler_collection = []
49     types_collection = set()
50     if custom_ops is None:
51         custom_ops = {}
52 
53     def add_hooks(m):
54         if len(list(m.children())) > 0:
55             return
56         m.register_buffer('total_ops', paddle.zeros([1], dtype='int64'))
57         m.register_buffer('total_params', paddle.zeros([1], dtype='int64'))
58         m_type = type(m)
59 
60         flops_fn = None
61         if m_type in custom_ops:
62             flops_fn = custom_ops[m_type]
63             if m_type not in types_collection:
64                 print("Customize Function has been applied to {}".format(
65                     m_type))
66         elif m_type in register_hooks:
67             flops_fn = register_hooks[m_type]
68             if m_type not in types_collection:
69                 print("{}'s flops has been counted".format(m_type))
70         else:
71             if m_type not in types_collection:
72                 print(
73                     "Cannot find suitable count function for {}. Treat it as zero FLOPs."
74                     .format(m_type))
75 
76         if flops_fn is not None:
77             flops_handler = m.register_forward_post_hook(flops_fn)
78             handler_collection.append(flops_handler)
79         params_handler = m.register_forward_post_hook(count_parameters)
80         io_handler = m.register_forward_post_hook(count_io_info)
81         handler_collection.append(params_handler)
82         handler_collection.append(io_handler)
83         types_collection.add(m_type)
84 
85     training = model.training
86 
87     model.eval()
88     model.apply(add_hooks)
89 
90     with paddle.framework.no_grad():
91         model(inputs)
92 
93     total_ops = 0
94     total_params = 0
95     for m in model.sublayers():
96         if len(list(m.children())) > 0:
97             continue
98         if set(['total_ops', 'total_params', 'input_shape',
99                 'output_shape']).issubset(set(list(m._buffers.keys()))):
100             total_ops += m.total_ops
101             total_params += m.total_params
102 
103     if training:
104         model.train()
105     for handler in handler_collection:
106         handler.remove()
107 
108     table = Table(
109         ["Layer Name", "Input Shape", "Output Shape", "Params(M)", "Flops(G)"])
110 
111     for n, m in model.named_sublayers():
112         if len(list(m.children())) > 0:
113             continue
114         if set(['total_ops', 'total_params', 'input_shape',
115                 'output_shape']).issubset(set(list(m._buffers.keys()))):
116             table.add_row([
117                 m.full_name(), list(m.input_shape.numpy()),
118                 list(m.output_shape.numpy()),
119                 round(float(m.total_params / 1e6), 3),
120                 round(float(m.total_ops / 1e9), 3)
121             ])
122             m._buffers.pop("total_ops")
123             m._buffers.pop("total_params")
124             m._buffers.pop('input_shape')
125             m._buffers.pop('output_shape')
126     if print_detail:
127         table.print_table()
128     print('Total Flops: {}G     Total Params: {}M'.format(
129         round(float(total_ops / 1e9), 3), round(float(total_params / 1e6), 3)))
130     return int(total_ops)
131 
132 
133 def analyze(args):
134     env_info = get_sys_env()
135     info = ['{}: {}'.format(k, v) for k, v in env_info.items()]
136     info = '\n'.join(['', format('Environment Information', '-^48s')] + info +
137                      ['-' * 48])
138     logger.info(info)
139 
140     paddle.set_device('cpu')
141 
142     cfg = Config(args.config)
143 
144     custom_ops = {paddle.nn.SyncBatchNorm: op_flops_funs.count_syncbn}
145     inputs = paddle.randn(args.input_shape)
146     _dynamic_flops(cfg.model, inputs, custom_ops=custom_ops, print_detail=True)
147 
148 
149 if __name__ == '__main__':
150     args = parse_args()
151     if not args.config:
152         raise RuntimeError('No configuration file specified.')
153 
154     logger.info("config:" + args.config)
155     logger.info("input_shape:")
156     logger.info(args.input_shape)
157     analyze(args)
158
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/tools/model/analyze_model.py b/tools/model/analyze_model.py
--- a/tools/model/analyze_model.py
+++ b/tools/model/analyze_model.py
@@ -21,14 +21,14 @@
 import os
 import sys
 
-import paddle
 import numpy as np
+import paddle
+from paddle.hapi.dynamic_flops import (count_io_info, count_parameters,
+                                       register_hooks)
+from paddle.hapi.static_flops import Table
 
-from paddleseg.cvlibs import Config
+from paddleseg.cvlibs import Config, SegBuilder
 from paddleseg.utils import get_sys_env, logger, op_flops_funs
-from paddle.hapi.dynamic_flops import (count_parameters, register_hooks,
-                                       count_io_info)
-from paddle.hapi.static_flops import Table
 
 
 def parse_args():
@@ -140,10 +140,11 @@
     paddle.set_device('cpu')
 
     cfg = Config(args.config)
+    builder = SegBuilder(cfg)
 
     custom_ops = {paddle.nn.SyncBatchNorm: op_flops_funs.count_syncbn}
     inputs = paddle.randn(args.input_shape)
-    _dynamic_flops(cfg.model, inputs, custom_ops=custom_ops, print_detail=True)
+    _dynamic_flops(builder.model, inputs, custom_ops=custom_ops, print_detail=True)
 
 
 if __name__ == '__main__':

{"golden_diff": "diff --git a/tools/model/analyze_model.py b/tools/model/analyze_model.py\n--- a/tools/model/analyze_model.py\n+++ b/tools/model/analyze_model.py\n@@ -21,14 +21,14 @@\n import os\n import sys\n \n-import paddle\n import numpy as np\n+import paddle\n+from paddle.hapi.dynamic_flops import (count_io_info, count_parameters,\n+                                       register_hooks)\n+from paddle.hapi.static_flops import Table\n \n-from paddleseg.cvlibs import Config\n+from paddleseg.cvlibs import Config, SegBuilder\n from paddleseg.utils import get_sys_env, logger, op_flops_funs\n-from paddle.hapi.dynamic_flops import (count_parameters, register_hooks,\n-                                       count_io_info)\n-from paddle.hapi.static_flops import Table\n \n \n def parse_args():\n@@ -140,10 +140,11 @@\n     paddle.set_device('cpu')\n \n     cfg = Config(args.config)\n+    builder = SegBuilder(cfg)\n \n     custom_ops = {paddle.nn.SyncBatchNorm: op_flops_funs.count_syncbn}\n     inputs = paddle.randn(args.input_shape)\n-    _dynamic_flops(cfg.model, inputs, custom_ops=custom_ops, print_detail=True)\n+    _dynamic_flops(builder.model, inputs, custom_ops=custom_ops, print_detail=True)\n \n \n if __name__ == '__main__':\n", "issue": "tool/model/analyze_model.py \u5206\u6790flops\u6587\u4ef6\u95ee\u9898\n### \u95ee\u9898\u786e\u8ba4 Search before asking\n\n- [X] \u6211\u5df2\u7ecf\u67e5\u8be2[\u5386\u53f2issue](https://github.com/PaddlePaddle/PaddleSeg/issues)(\u5305\u62ecopen\u4e0eclosed)\uff0c\u6ca1\u6709\u53d1\u73b0\u76f8\u4f3c\u7684bug\u3002I have searched the [open and closed issues](https://github.com/PaddlePaddle/PaddleSeg/issues) and found no similar bug report.\n\n\n### Bug\u63cf\u8ff0 Describe the Bug\n\n\u5728\u8fd0\u884ctool/model/analyze_model.py\u51fa\u73b0\u9519\u8bef\uff1a\r\nAttributeError: 'Config' object has no attribute 'model' \r\n\r\ntool/model/analyze_model.py\u6e90\u7801\u4e2d\u5e76\u6ca1\u6709\u6839\u636emodel_cfg\u5b9e\u4f8b\u5316\u51fa\u4e00\u4e2a\u5177\u4f53\u7684model\uff0c\u800c\u5728'_dynamic_flops'\u51fd\u6570\u4e2d\uff0c\r\n\u4ee3\u7801\u4e0d\u65ad\u8c03\u7528`model.train()`,'model.eval()'\u7b49\u51fd\u6570\n\n### \u590d\u73b0\u73af\u5883 Environment\n\n\r\nplatform: Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.31\r\nPython: 3.9.0 (default, Nov 15 2020, 14:28:56) [GCC 7.3.0]\r\nPaddle compiled with cuda: False\r\nGCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0\r\nPaddleSeg: 2.8.0\r\nPaddlePaddle: 2.4.2\r\nOpenCV: 4.5.5\n\n### Bug\u63cf\u8ff0\u786e\u8ba4 Bug description confirmation\n\n- [X] \u6211\u786e\u8ba4\u5df2\u7ecf\u63d0\u4f9b\u4e86Bug\u590d\u73b0\u6b65\u9aa4\u3001\u4ee3\u7801\u6539\u52a8\u8bf4\u660e\u3001\u4ee5\u53ca\u73af\u5883\u4fe1\u606f\uff0c\u786e\u8ba4\u95ee\u9898\u662f\u53ef\u4ee5\u590d\u73b0\u7684\u3002I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.\n\n\n### \u662f\u5426\u613f\u610f\u63d0\u4ea4PR\uff1f Are you willing to submit a PR?\n\n- [ ] \u6211\u613f\u610f\u63d0\u4ea4PR\uff01I'd like to help by submitting a PR!\n", "before_files": [{"content": "# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"\nAnalyze the FLOPs and Params of the model.\nUsually, just call paddle.flops to output the model information.\nWe use this file for output flops clearly.\n\"\"\"\n\nimport argparse\nimport os\nimport sys\n\nimport paddle\nimport numpy as np\n\nfrom paddleseg.cvlibs import Config\nfrom paddleseg.utils import get_sys_env, logger, op_flops_funs\nfrom paddle.hapi.dynamic_flops import (count_parameters, register_hooks,\n                                       count_io_info)\nfrom paddle.hapi.static_flops import Table\n\n\ndef parse_args():\n    parser = argparse.ArgumentParser(description='Model training')\n    parser.add_argument(\"--config\", help=\"The path of config file.\", type=str)\n    parser.add_argument(\n        \"--input_shape\",\n        nargs='+',\n        type=int,\n        help=\"Set the input shape, such as --input_shape 1 3 1024 1024\",\n        default=[1, 3, 1024, 1024])\n    return parser.parse_args()\n\n\n# For output flops clearly, modify the dynamic_flops function in paddle/hapi/dynamic_flops.py\ndef _dynamic_flops(model, inputs, custom_ops=None, print_detail=False):\n    handler_collection = []\n    types_collection = set()\n    if custom_ops is None:\n        custom_ops = {}\n\n    def add_hooks(m):\n        if len(list(m.children())) > 0:\n            return\n        m.register_buffer('total_ops', paddle.zeros([1], dtype='int64'))\n        m.register_buffer('total_params', paddle.zeros([1], dtype='int64'))\n        m_type = type(m)\n\n        flops_fn = None\n        if m_type in custom_ops:\n            flops_fn = custom_ops[m_type]\n            if m_type not in types_collection:\n                print(\"Customize Function has been applied to {}\".format(\n                    m_type))\n        elif m_type in register_hooks:\n            flops_fn = register_hooks[m_type]\n            if m_type not in types_collection:\n                print(\"{}'s flops has been counted\".format(m_type))\n        else:\n            if m_type not in types_collection:\n                print(\n                    \"Cannot find suitable count function for {}. Treat it as zero FLOPs.\"\n                    .format(m_type))\n\n        if flops_fn is not None:\n            flops_handler = m.register_forward_post_hook(flops_fn)\n            handler_collection.append(flops_handler)\n        params_handler = m.register_forward_post_hook(count_parameters)\n        io_handler = m.register_forward_post_hook(count_io_info)\n        handler_collection.append(params_handler)\n        handler_collection.append(io_handler)\n        types_collection.add(m_type)\n\n    training = model.training\n\n    model.eval()\n    model.apply(add_hooks)\n\n    with paddle.framework.no_grad():\n        model(inputs)\n\n    total_ops = 0\n    total_params = 0\n    for m in model.sublayers():\n        if len(list(m.children())) > 0:\n            continue\n        if set(['total_ops', 'total_params', 'input_shape',\n                'output_shape']).issubset(set(list(m._buffers.keys()))):\n            total_ops += m.total_ops\n            total_params += m.total_params\n\n    if training:\n        model.train()\n    for handler in handler_collection:\n        handler.remove()\n\n    table = Table(\n        [\"Layer Name\", \"Input Shape\", \"Output Shape\", \"Params(M)\", \"Flops(G)\"])\n\n    for n, m in model.named_sublayers():\n        if len(list(m.children())) > 0:\n            continue\n        if set(['total_ops', 'total_params', 'input_shape',\n                'output_shape']).issubset(set(list(m._buffers.keys()))):\n            table.add_row([\n                m.full_name(), list(m.input_shape.numpy()),\n                list(m.output_shape.numpy()),\n                round(float(m.total_params / 1e6), 3),\n                round(float(m.total_ops / 1e9), 3)\n            ])\n            m._buffers.pop(\"total_ops\")\n            m._buffers.pop(\"total_params\")\n            m._buffers.pop('input_shape')\n            m._buffers.pop('output_shape')\n    if print_detail:\n        table.print_table()\n    print('Total Flops: {}G     Total Params: {}M'.format(\n        round(float(total_ops / 1e9), 3), round(float(total_params / 1e6), 3)))\n    return int(total_ops)\n\n\ndef analyze(args):\n    env_info = get_sys_env()\n    info = ['{}: {}'.format(k, v) for k, v in env_info.items()]\n    info = '\\n'.join(['', format('Environment Information', '-^48s')] + info +\n                     ['-' * 48])\n    logger.info(info)\n\n    paddle.set_device('cpu')\n\n    cfg = Config(args.config)\n\n    custom_ops = {paddle.nn.SyncBatchNorm: op_flops_funs.count_syncbn}\n    inputs = paddle.randn(args.input_shape)\n    _dynamic_flops(cfg.model, inputs, custom_ops=custom_ops, print_detail=True)\n\n\nif __name__ == '__main__':\n    args = parse_args()\n    if not args.config:\n        raise RuntimeError('No configuration file specified.')\n\n    logger.info(\"config:\" + args.config)\n    logger.info(\"input_shape:\")\n    logger.info(args.input_shape)\n    analyze(args)\n", "path": "tools/model/analyze_model.py"}], "after_files": [{"content": "# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"\nAnalyze the FLOPs and Params of the model.\nUsually, just call paddle.flops to output the model information.\nWe use this file for output flops clearly.\n\"\"\"\n\nimport argparse\nimport os\nimport sys\n\nimport numpy as np\nimport paddle\nfrom paddle.hapi.dynamic_flops import (count_io_info, count_parameters,\n                                       register_hooks)\nfrom paddle.hapi.static_flops import Table\n\nfrom paddleseg.cvlibs import Config, SegBuilder\nfrom paddleseg.utils import get_sys_env, logger, op_flops_funs\n\n\ndef parse_args():\n    parser = argparse.ArgumentParser(description='Model training')\n    parser.add_argument(\"--config\", help=\"The path of config file.\", type=str)\n    parser.add_argument(\n        \"--input_shape\",\n        nargs='+',\n        type=int,\n        help=\"Set the input shape, such as --input_shape 1 3 1024 1024\",\n        default=[1, 3, 1024, 1024])\n    return parser.parse_args()\n\n\n# For output flops clearly, modify the dynamic_flops function in paddle/hapi/dynamic_flops.py\ndef _dynamic_flops(model, inputs, custom_ops=None, print_detail=False):\n    handler_collection = []\n    types_collection = set()\n    if custom_ops is None:\n        custom_ops = {}\n\n    def add_hooks(m):\n        if len(list(m.children())) > 0:\n            return\n        m.register_buffer('total_ops', paddle.zeros([1], dtype='int64'))\n        m.register_buffer('total_params', paddle.zeros([1], dtype='int64'))\n        m_type = type(m)\n\n        flops_fn = None\n        if m_type in custom_ops:\n            flops_fn = custom_ops[m_type]\n            if m_type not in types_collection:\n                print(\"Customize Function has been applied to {}\".format(\n                    m_type))\n        elif m_type in register_hooks:\n            flops_fn = register_hooks[m_type]\n            if m_type not in types_collection:\n                print(\"{}'s flops has been counted\".format(m_type))\n        else:\n            if m_type not in types_collection:\n                print(\n                    \"Cannot find suitable count function for {}. Treat it as zero FLOPs.\"\n                    .format(m_type))\n\n        if flops_fn is not None:\n            flops_handler = m.register_forward_post_hook(flops_fn)\n            handler_collection.append(flops_handler)\n        params_handler = m.register_forward_post_hook(count_parameters)\n        io_handler = m.register_forward_post_hook(count_io_info)\n        handler_collection.append(params_handler)\n        handler_collection.append(io_handler)\n        types_collection.add(m_type)\n\n    training = model.training\n\n    model.eval()\n    model.apply(add_hooks)\n\n    with paddle.framework.no_grad():\n        model(inputs)\n\n    total_ops = 0\n    total_params = 0\n    for m in model.sublayers():\n        if len(list(m.children())) > 0:\n            continue\n        if set(['total_ops', 'total_params', 'input_shape',\n                'output_shape']).issubset(set(list(m._buffers.keys()))):\n            total_ops += m.total_ops\n            total_params += m.total_params\n\n    if training:\n        model.train()\n    for handler in handler_collection:\n        handler.remove()\n\n    table = Table(\n        [\"Layer Name\", \"Input Shape\", \"Output Shape\", \"Params(M)\", \"Flops(G)\"])\n\n    for n, m in model.named_sublayers():\n        if len(list(m.children())) > 0:\n            continue\n        if set(['total_ops', 'total_params', 'input_shape',\n                'output_shape']).issubset(set(list(m._buffers.keys()))):\n            table.add_row([\n                m.full_name(), list(m.input_shape.numpy()),\n                list(m.output_shape.numpy()),\n                round(float(m.total_params / 1e6), 3),\n                round(float(m.total_ops / 1e9), 3)\n            ])\n            m._buffers.pop(\"total_ops\")\n            m._buffers.pop(\"total_params\")\n            m._buffers.pop('input_shape')\n            m._buffers.pop('output_shape')\n    if print_detail:\n        table.print_table()\n    print('Total Flops: {}G     Total Params: {}M'.format(\n        round(float(total_ops / 1e9), 3), round(float(total_params / 1e6), 3)))\n    return int(total_ops)\n\n\ndef analyze(args):\n    env_info = get_sys_env()\n    info = ['{}: {}'.format(k, v) for k, v in env_info.items()]\n    info = '\\n'.join(['', format('Environment Information', '-^48s')] + info +\n                     ['-' * 48])\n    logger.info(info)\n\n    paddle.set_device('cpu')\n\n    cfg = Config(args.config)\n    builder = SegBuilder(cfg)\n\n    custom_ops = {paddle.nn.SyncBatchNorm: op_flops_funs.count_syncbn}\n    inputs = paddle.randn(args.input_shape)\n    _dynamic_flops(builder.model, inputs, custom_ops=custom_ops, print_detail=True)\n\n\nif __name__ == '__main__':\n    args = parse_args()\n    if not args.config:\n        raise RuntimeError('No configuration file specified.')\n\n    logger.info(\"config:\" + args.config)\n    logger.info(\"input_shape:\")\n    logger.info(args.input_shape)\n    analyze(args)\n", "path": "tools/model/analyze_model.py"}]}