kerrj / lerf

Code for LERF: Language Embedded Radiance Fields
https://www.lerf.io/
MIT License
649 stars 63 forks source link

What is the purpose of this code in _embed_clip_tiles method? #71

Open Shiva-Gantha opened 8 months ago

Shiva-Gantha commented 8 months ago

What is the use or purpose of the following lines, which is apparently copying the last column and row of the embedding matrix and repeating it? clip_embeds = torch.concat((clip_embeds, clip_embeds[:, [-1], :]), dim=1) clip_embeds = torch.concat((clip_embeds, clip_embeds[[-1], :, :]), dim=0)

Link to the code: https://github.com/kerrj/lerf/blob/4a13f2074f3f3a162d9b3b9e6c4bbcc21499a7f2/lerf/data/utils/patch_embedding_dataloader.py#L114C9-L115C82

smileyenot983 commented 2 months ago

@Shiva-Gantha Hello, have you figured out the purpose of these 2 lines? I am wondering why where the last column and row of clip feature cloned. Observed same thing while working with LEGAUSSIANS and came here