提交 a015063b 编写于 作者: M mamingjie-China

fix the bug

上级 785f1eb2
...@@ -189,14 +189,14 @@ def main(): ...@@ -189,14 +189,14 @@ def main():
assert args.framework is not None, "--framework is not defined(support tensorflow/caffe/onnx)" assert args.framework is not None, "--framework is not defined(support tensorflow/caffe/onnx)"
assert args.save_dir is not None, "--save_dir is not defined" assert args.save_dir is not None, "--save_dir is not defined"
try: # try:
import paddle # import paddle
v0, v1, v2 = paddle.__version__.split('.') # v0, v1, v2 = paddle.__version__.split('.')
if int(v0) != 1 or int(v1) < 5: # if int(v0) != 1 or int(v1) < 5:
print("paddlepaddle>=1.5.0 is required") # print("paddlepaddle>=1.5.0 is required")
return # return
except: # except:
print("paddlepaddle not installed, use \"pip install paddlepaddle\"") # print("paddlepaddle not installed, use \"pip install paddlepaddle\"")
if args.framework == "tensorflow": if args.framework == "tensorflow":
assert args.model is not None, "--model should be defined while translating tensorflow model" assert args.model is not None, "--model should be defined while translating tensorflow model"
......
...@@ -1010,7 +1010,7 @@ class TFOpMapper(OpMapper): ...@@ -1010,7 +1010,7 @@ class TFOpMapper(OpMapper):
attr = { attr = {
"bias_attr": False, "bias_attr": False,
"param_attr": string(kernel.layer_name), "param_attr": string(kernel.layer_name),
"num_filters": k_size[3], "num_filters": k_size[2],
"filter_size": k_size[0:2], "filter_size": k_size[0:2],
"stride": strides[2:4], "stride": strides[2:4],
"dilation": dilations[2:4], "dilation": dilations[2:4],
......
...@@ -1007,7 +1007,7 @@ class TFOpMapperNHWC(OpMapper): ...@@ -1007,7 +1007,7 @@ class TFOpMapperNHWC(OpMapper):
attr = { attr = {
"bias_attr": False, "bias_attr": False,
"param_attr": string(kernel.layer_name), "param_attr": string(kernel.layer_name),
"num_filters": k_size[3], "num_filters": k_size[2],
"filter_size": k_size[0:2], "filter_size": k_size[0:2],
"stride": strides[2:4], "stride": strides[2:4],
"dilation": dilations[2:4], "dilation": dilations[2:4],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册