parameters: (self, decay, emb_dim=11, scope=None, table_id=None)
docstring: shrink batch_sum in pserver by multiplying by decay
          Args:
              decay(float): the decay rate, usually range in (0, 1)
              emb_dim(int): one element's length in datanorm layer
              scope(Scope): Scope object, default is fluid.global_scope()
              table_id(int): table id of shrinking dense table. None means shrink all,
                             you should specify it when using multiple scopes,
                             default is None.
          Example:
              >>> fleet.shrink_dense_table(0.98, 11, myscope1, 1)
              >>> fleet.shrink_dense_table(0.98, 11, myscope1, 2)
              >>> fleet.shrink_dense_table(0.98, 11, myscope2, 3)
docstring_summary: shrink batch_sum in pserver by multiplying by decay
          Args:
              decay(float): the decay rate, usually range in (0, 1)
              emb_dim(int): one element's length in datanorm layer
              scope(Scope): Scope object, default is fluid.global_scope()
              table_id(int): table id of shrinking dense table. None means shrink all,
                             you should specify it when using multiple scopes,
                             default is None.
          Example:
              >>> fleet.shrink_dense_table(0.98, 11, myscope1, 1)
              >>> fleet.shrink_dense_table(0.98, 11, myscope1, 2)
              >>> fleet.shrink_dense_table(0.98, 11, myscope2, 3)
docstring_tokens: shrink batch_sum in pserver by multiplying by decay Args : decay ( float ) : the decay rate usually range in ( 0 1 ) emb_dim ( int ) : one element s length in datanorm layer scope ( Scope ) : Scope object default is fluid . global_scope () table_id ( int ) : table id of shrinking dense table . None means shrink all you should specify it when using multiple scopes default is None . Example : >>> fleet . shrink_dense_table ( 0 . 98 11 myscope1 1 ) >>> fleet . shrink_dense_table ( 0 . 98 11 myscope1 2 ) >>> fleet . shrink_dense_table ( 0 . 98 11 myscope2 3 )
function: def shrink_dense_table(self, decay, emb_dim=11, scope=None, table_id=None):
          """
          shrink batch_sum in pserver by multiplying by decay
          Args:
              decay(float): the decay rate, usually range in (0, 1)
              emb_dim(int): one element's length in datanorm layer
              scope(Scope): Scope object, default is fluid.global_scope()
              table_id(int): table id of shrinking dense table. None means shrink all,
                             you should specify it when using multiple scopes,
                             default is None.
          Example:
              >>> fleet.shrink_dense_table(0.98, 11, myscope1, 1)
              >>> fleet.shrink_dense_table(0.98, 11, myscope1, 2)
              >>> fleet.shrink_dense_table(0.98, 11, myscope2, 3)
          """
          if scope is None:
              scope = fluid.global_scope()
          self._role_maker._barrier_worker()
          if self._role_maker.is_first_worker():
              for tp in self._opt_info["fleet_desc"].trainer_param:
                  for i in tp.dense_table:
                      if table_id is not None and table_id != i.table_id:
                          continue
                      var_list = [var for var in i.dense_variable_name]
                      skip = False
                      for var in var_list:
                          if scope.find_var(var) is None:
                              skip = True
                              break
                      if skip:
                          continue
                      self._fleet_ptr.shrink_dense_table(i.table_id, scope,
                                                         var_list, decay, emb_dim)
          self._role_maker._barrier_worker()
function_tokens: def shrink_dense_table ( self , decay , emb_dim = 11 , scope = None , table_id = None ) : if scope is None : scope = fluid . global_scope ( ) self . _role_maker . _barrier_worker ( ) if self . _role_maker . is_first_worker ( ) : for tp in self . _opt_info [ "fleet_desc" ] . trainer_param : for i in tp . dense_table : if table_id is not None and table_id != i . table_id : continue var_list = [ var for var in i . dense_variable_name ] skip = False for var in var_list : if scope . find_var ( var ) is None : skip = True break if skip : continue self . _fleet_ptr . shrink_dense_table ( i . table_id , scope , var_list , decay , emb_dim ) self . _role_maker . _barrier_worker ( )