未验证 提交 57c4e41d 编写于 作者: J Jason 提交者: GitHub

Merge pull request #265 from qili93/fix_upper_paddle_api

fix ParamAttr api in create_parameter, test=develop
......@@ -88,6 +88,8 @@ class Layer(object):
for key, value in param_attr.items():
if '\n' in str(value):
value = string(str(value).replace('\n', ','))
if str(key) == 'attr':
value = 'ParamAttr(' + str(value) + ')'
layer_code = layer_code + key + "={}, ".format(value)
layer_code = layer_code.strip(", ")
......
......@@ -85,7 +85,8 @@ class TFOpMapper(OpMapper):
not_placeholder = list()
for name in self.graph.input_nodes:
if self.graph.get_node(name).layer_type != "Placeholder" and self.graph.get_node(name).layer_type != "OneShotIterator":
if self.graph.get_node(name).layer_type != "Placeholder"
and self.graph.get_node(name).layer_type != "OneShotIterator":
not_placeholder.append(name)
for name in not_placeholder:
idx = self.graph.input_nodes.index(name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册