@@ -1047,6 +1047,13 @@ def fc_layer(input,
1047
1047
if isinstance (param_attr , collections .Sequence ):
1048
1048
assert len (input ) == len (param_attr )
1049
1049
else :
1050
+ if "parameter_name" in param_attr .attr and len (input ) > 1 :
1051
+ logger .fatal (
1052
+ "When the name field of param_attr is manually specified "
1053
+ "and the input is a list, the param_attr should also be a "
1054
+ "list with each item being the param_attr for each input "
1055
+ "item. If only one named param_attr is provided, all the "
1056
+ "input items would share this parameter." )
1050
1057
param_attr = [copy .deepcopy (param_attr ) for _ in range (len (input ))]
1051
1058
1052
1059
assert isinstance (input , collections .Sequence )
@@ -4877,6 +4884,13 @@ def selective_fc_layer(input,
4877
4884
if isinstance (param_attr , collections .Sequence ):
4878
4885
assert len (input ) == len (param_attr )
4879
4886
else :
4887
+ if "parameter_name" in param_attr .attr and len (input ) > 1 :
4888
+ logger .fatal (
4889
+ "When the name field of param_attr is manually specified "
4890
+ "and the input is a list, the param_attr should also be a "
4891
+ "list with each item being the param_attr for each input "
4892
+ "item. If only one named param_attr is provided, all the "
4893
+ "input items would share this parameter." )
4880
4894
param_attr = [copy .deepcopy (param_attr ) for _ in range (len (input ))]
4881
4895
4882
4896
assert isinstance (input , collections .Sequence )
0 commit comments