Skip to content

Why view_embedding is not trainable? #25

@AlisherBlack

Description

@AlisherBlack

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions