besskge.embedding.refactor_embedding_sharding
- besskge.embedding.refactor_embedding_sharding(entity_embedding, old_sharding, new_sharding)[source]
Refactor sharded entity embedding table to pass from one entity sharding to a different one.
- Parameters:
- Return type:
- Returns:
shape: (n_shard_new, max_ent_per_shard_new, row_size) The refactored entity embedding table, sharded according to new_sharding.