From 133a8ea7fd9b003bc9921bb56f7533a125b7e972 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 11 Aug 2017 16:22:57 +0800 Subject: [PATCH] Polish Error message --- python/paddle/v2/framework/op.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/v2/framework/op.py b/python/paddle/v2/framework/op.py index 9faa5c9252c..904de08da4e 100644 --- a/python/paddle/v2/framework/op.py +++ b/python/paddle/v2/framework/op.py @@ -49,7 +49,7 @@ class OpDescCreationMethod(object): input_arguments = [input_arguments] if not input_parameter.duplicable and len(input_arguments) > 1: - raise ValueError("Input %s only accept one output, but give %d" + raise ValueError("Input %s only accepts one input, but give %d" % (input_parameter.name, len(input_arguments))) ipt = op_desc.inputs.add() @@ -63,7 +63,7 @@ class OpDescCreationMethod(object): if not output_parameter.duplicable and len(output_arguments) > 1: raise ValueError( - "Output %s only accept one output, but give %d" % + "Output %s only accepts one output, but give %d" % (output_parameter.name, len(output_arguments))) out = op_desc.outputs.add() -- GitLab