We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, If i have trained a siamese model, how can i use this model for my classification task?
Change the embedding_net into siamese_net and call its get_embedding to get feature vectors , is the following code correct? anticipating your reply.
siamese_net = EmbeddingNet() class ClassificationNet(nn.Module): def __init__(self, siamese_net , n_classes): super(ClassificationNet, self).__init__() self.siamese_net = siamese_net self.n_classes = n_classes self.nonlinear = nn.PReLU() self.fc1 = nn.Linear(2, n_classes) def forward(self, x): output = self.siamese_net.get_embedding (x) output = self.nonlinear(output) scores = F.log_softmax(self.fc1(output), dim=-1) return scores
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
If i have trained a siamese model, how can i use this model for my classification task?
Change the embedding_net into siamese_net and call its get_embedding to get feature vectors , is the following code correct? anticipating your reply.
The text was updated successfully, but these errors were encountered: