LiDAR-Diffusion
LiDAR-Diffusion copied to clipboard
Why view_embedding is not trainable?
This is the first time I've seen positional encoding defined as nn.Parameter but set to not be trainable, even though it's initialized with random weights. Could this be a mistake? If I misunderstood something, I apologize.
https://github.com/hancyran/LiDAR-Diffusion/blob/8416ddbbda881553088109a66badf71ff11999e0/lidm/modules/encoders/modules.py#L255
with torch.no_grad():
img_feats = [self.model.encode_image(self.preprocess(img))[:, None] for img in x]
x = torch.cat(img_feats, 1).float() + self.view_embedding
x = self.linear(x)
P.S. self.linear is not trainable as well