@@ -5879,19 +5879,19 @@ def prelu_layer(input,
58795879 size = l .config .size )
58805880
58815881
5882- @layer_support (ERROR_CLIPPING , DROPOUT )
58835882@wrap_name_default ()
5883+ @layer_support (ERROR_CLIPPING , DROPOUT )
58845884@wrap_act_default (act = LinearActivation ())
58855885def gated_unit_layer (input ,
58865886 size ,
58875887 act = None ,
58885888 name = None ,
58895889 gate_attr = None ,
5890- gate_bias_attr = True ,
58915890 gate_param_attr = None ,
5891+ gate_bias_attr = True ,
5892+ inproj_attr = None ,
58925893 inproj_param_attr = None ,
58935894 inproj_bias_attr = True ,
5894- inproj_layer_attr = None ,
58955895 layer_attr = None ):
58965896 """
58975897 The gated unit layer implements a simple gating mechanism over the input.
@@ -5923,18 +5923,18 @@ def gated_unit_layer(input,
59235923 clipping threshold, dropout and so on. See ExtraLayerAttribute for
59245924 more details.
59255925 :type gate_attr: ExtraLayerAttribute|None
5926- :param gate_bias_attr: Attributes to tune the learnable bias of the gate.
5927- :type gate_bias_attr: ParameterAttribute|None
59285926 :param gate_param_attr: Attributes to tune the learnable projected matrix
59295927 parameter of the gate.
59305928 :type gate_param_attr: ParameterAttribute|None
5929+ :param gate_bias_attr: Attributes to tune the learnable bias of the gate.
5930+ :type gate_bias_attr: ParameterAttribute|None
5931+ :param inproj_attr: Attributes to the tune the projected input, for
5932+ example, error clipping threshold, dropout and so on. See
5933+ ExtraLayerAttribute for more details.
5934+ :type inproj_attr: ExtraLayerAttribute|None
59315935 :param inproj_param_attr: Attributes to tune the learnable parameter of
59325936 the projection of input.
59335937 :type inproj_param_attr: ParameterAttribute|None
5934- :param inproj_layer_attr: Attributes to the tune the projected input, for
5935- example, error clipping threshold, dropout and so on. See
5936- ExtraLayerAttribute for more details.
5937- :type inproj_layer_attr: ExtraLayerAttribute|None
59385938 :param inproj_bias_attr: Attributes to tune the learnable bias of
59395939 projection of the input.
59405940 :type inproj_bias_attr: ParameterAttribute|None
@@ -5954,17 +5954,17 @@ def gated_unit_layer(input,
59545954 name = "%s_input_proj" % name ,
59555955 size = size ,
59565956 act = act ,
5957+ layer_attr = inproj_attr ,
59575958 param_attr = inproj_param_attr ,
5958- layer_attr = inproj_layer_attr ,
59595959 bias_attr = inproj_bias_attr )
59605960
59615961 gate = fc_layer (
59625962 size = size ,
59635963 name = "%s_gate" % name ,
59645964 act = SigmoidActivation (),
59655965 input = input ,
5966- param_attr = gate_param_attr ,
59675966 layer_attr = gate_attr ,
5967+ param_attr = gate_param_attr ,
59685968 bias_attr = gate_bias_attr )
59695969 return mixed_layer (
59705970 name = "%s_gated_act" % name ,
0 commit comments