torch-ash icon indicating copy to clipboard operation
torch-ash copied to clipboard

Question about Hashmap resizing.

Open marrblue opened this issue 9 months ago • 0 comments

Hi Dr. Dong @theNded Thanks for your amazing work and great project!

Here I have a question and looking forward your help : ) I noticed that HashEmbedding class disabled resizing to maintain a static embedding. Is it because the indices of the hashmap will change after resizing. If it is feasible to achieve dynamic embedding allocation during incremental mapping based on it. For example we explicitly allocate a embedding index to each grids like {grid_coor, embedding_idx}. When the capacity is less than we need, we extend the embeddings and resize the hashmap.

marrblue avatar May 17 '24 13:05 marrblue