MCPcopy Create free account
hub / github.com/ICTMCG/FakeSV / __init__

Method __init__

code/models/Baselines.py:137–143  ·  view source on GitHub ↗
(self,bert_model,fea_dim)

Source from the content-addressed store, hash-verified

135
136class bComments(torch.nn.Module):
137 def __init__(self,bert_model,fea_dim):
138 super(bComments, self).__init__()
139 self.comment_dim = 768
140 self.bert = BertModel.from_pretrained(bert_model).requires_grad_(False)
141 self.attention = Attention(dim=128,heads=4)
142 self.linear_comment = nn.Sequential(torch.nn.Linear(self.comment_dim, fea_dim),torch.nn.ReLU())
143 self.classifier = nn.Linear(fea_dim,2)
144
145 def forward(self, **kwargs):
146 comments_inputid = kwargs['comments_inputid']

Callers

nothing calls this directly

Calls 2

AttentionClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected