search_pyramid_hash¶
- paddle.fluid.contrib.layers.nn. search_pyramid_hash ( input, num_emb, space_len, pyramid_layer, rand_len, drop_out_percent, is_training, use_filter, white_list_len, black_list_len, seed, lr, param_attr=None, param_attr_wl=None, param_attr_bl=None, name=None, distribute_update_vars=None, dtype='float32' ) [source]
- 
         Pyramid hash embedding - Parameters
- 
           - input (Variable) – LoDTensor<int32> Variable contained the IDs’ information. 
- num_emb (int) – The embedding size of output. 
- space_len (int) – The length of pyramid hash embedding space. 
- pyramid_layer (int) – The number of pyramid layers. It should be greater than 2. 
- rand_len (int) – The minimum length of pyramid hash cell. 
- drop_out_percent (float) – The probability of dropping out the input token randomly. It should satisfy: [0., 1.] 
- is_training (bool) – Whether in training or testing phrase. 
- use_filter (bool) – If set True, the white filter and black filter should be given by - param_attr_wland- param_attr_bl.
- white_list_len (int) – If set \(white_list_len>0\) , white filter with shape [white_list_len, 1] should be provided by param_attr_wl. 
- black_list_len (int) – If set \(black_list_len>0\) , black filter with shape [black_list_len, 1] should be provided by param_attr_bl. 
- seed (int) – The number of random seed. 
- lr (float) – The learning rate of weight created by - param_attrwith shape [space_len+rand_len, 1] in this layer.
- param_attr (ParamAttr) – To specify the weight parameter property. Default: None, which means the default weight parameter property is used. See usage for details in api_fluid_ParamAttr . 
- param_attr_wl (ParamAttr) – Specified parameters of white filter. 
- param_attr_bl (ParamAttr) – Specified parameters of black filter. 
- distribute_update_vars (list[ParamAttr.name]) – Decided which params should be updated in distribute training. Used in Distribute Transpiler to create a trainer/server program. 
- name (str, optional) – The default value is None. Normally there is no need for user to set this property. For more information, please refer to Name . 
- dtype (str) – The data type of output variable, float32. 
 
- Returns
- 
           LoDTensor of pyramid hash embedding. 
- Return type
- 
           Variable 
 
