Skip to content

Commit 0d79e97

Browse files
committed
Refine the log message in fc layer
1 parent 0e6c96a commit 0d79e97

File tree

1 file changed

+10
-4
lines changed
  • python/paddle/trainer_config_helpers

1 file changed

+10
-4
lines changed

python/paddle/trainer_config_helpers/layers.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,8 +1046,11 @@ def fc_layer(input,
10461046
else:
10471047
if "parameter_name" in param_attr.attr and len(input) > 1:
10481048
logger.fatal(
1049-
"You should set the parameter name for each of the input item."
1050-
)
1049+
"When the name field of param_attr is manually specified "
1050+
"and the input is a list, the param_attr should also be a "
1051+
"list with each item being the param_attr for each input "
1052+
"item. If only one named param_attr is provided, all the "
1053+
"input items would share this parameter.")
10511054
param_attr = [copy.deepcopy(param_attr) for _ in range(len(input))]
10521055

10531056
assert isinstance(input, collections.Sequence)
@@ -4869,8 +4872,11 @@ def selective_fc_layer(input,
48694872
else:
48704873
if "parameter_name" in param_attr.attr and len(input) > 1:
48714874
logger.fatal(
4872-
"You should set the parameter name for each of the input item."
4873-
)
4875+
"When the name field of param_attr is manually specified "
4876+
"and the input is a list, the param_attr should also be a "
4877+
"list with each item being the param_attr for each input "
4878+
"item. If only one named param_attr is provided, all the "
4879+
"input items would share this parameter.")
48744880
param_attr = [copy.deepcopy(param_attr) for _ in range(len(input))]
48754881

48764882
assert isinstance(input, collections.Sequence)

0 commit comments

Comments
 (0)