Skip to content

Any special reason for F.linear #58

Description

@ppriyank

Hello,

Thank you for the code!!
I have a trivial doubt on why linear layer MLP layer computed in an indirect way. For example,

https://github.com/FoundationVision/GLEE/blob/main/projects/GLEE/glee/backbone/eva02.py#L98

self.q_proj = nn.Linear(dim, all_head_dim, bias=False)
self.q_bias = nn.Parameter(torch.zeros(all_head_dim))
...
q = F.linear(input=x, weight=self.q_proj.weight, bias=self.q_bias)

Why not directly do

self.q_proj = nn.Linear(dim, all_head_dim, bias=True )
...
q = self.q_proj(x)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions