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.
|
x = torch.cat(img_feats, 1).float() + self.view_embedding |
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
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.
LiDAR-Diffusion/lidm/modules/encoders/modules.py
Line 255 in 8416ddb
P.S. self.linear is not trainable as well