Browse Source

!11041 [GraphKernel] Change `None` input desc to null list in model builder

From: @tronzhang
Reviewed-by: @gaoxiong1,@ckey_dou
Signed-off-by: @ckey_dou
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
5169ff24ab
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mindspore/_extends/graph_kernel/model/model_builder.py

+ 2
- 2
mindspore/_extends/graph_kernel/model/model_builder.py View File

@@ -1,4 +1,4 @@
# Copyright 2020 Huawei Technologies Co., Ltd
# Copyright 2020-2021 Huawei Technologies Co., Ltd
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -274,7 +274,7 @@ class CompositeGraph:


builder = GraphBuilder() builder = GraphBuilder()
with builder.graph_scope(desc['op']): with builder.graph_scope(desc['op']):
for in_desc in desc['input_desc']:
for in_desc in desc['input_desc'] if desc['input_desc'] is not None else []:
name, shape, dtype, data_format = in_desc[0]['tensor_name'], in_desc[ name, shape, dtype, data_format = in_desc[0]['tensor_name'], in_desc[
0]['shape'], in_desc[0]['data_type'], in_desc[0]['format'] 0]['shape'], in_desc[0]['data_type'], in_desc[0]['format']
self.tensors[name] = builder.tensor( self.tensors[name] = builder.tensor(


Loading…
Cancel
Save