提交 47cadf23 编写于 作者: Q qiaolongfei

refine code

上级 d46c8e83
......@@ -20,7 +20,7 @@ cp -r frontend/dist server/visualdl/frontend/dist
#### Step 3: build and install Python package
```shell
cd server/
python setup.py bdist_wheel
sh build.sh
cd dist
sudo pip install --upgrade visualdl-0.0.1-py2-none-any.whl
```
......
......@@ -10,22 +10,22 @@ def reorganize_inout(json_obj, key):
:return:
"""
for index in range(len(json_obj[key])):
input = json_obj[key][index]
input_new = dict()
var = json_obj[key][index]
var_new = dict()
# set name
input_new['name'] = input['name']
var_new['name'] = var['name']
tensor_type = input['type']['tensorType']
tensor_type = var['type']['tensorType']
# set data_type
input_new['data_type'] = tensor_type['elemType']
var_new['data_type'] = tensor_type['elemType']
# set shape
shape = [dim['dimValue'] for dim in tensor_type['shape']['dim']]
input_new['shape'] = shape
var_new['shape'] = shape
json_obj[key][index] = input_new
json_obj[key][index] = var_new
def load_model(model_pb_path):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册