CMeKG代码解读(以项目为导向从零开始学习知识图谱)(二)
接上文
https://blog.csdn.net/chen_nnn/article/details/122795768https://blog.csdn.net/chen_nnn/article/details/122795768
目录
Model4po类
Model4po类
class Model4po(nn.Module):
def __init__(self, num_p=config.num_p, hidden_size=768):
super(Model4po, self).__init__()
self.dropout = nn.Dropout(p=0.4)
self.linear = nn.Linear(in_features=hidden_size, out_features=num_p * 2, bias=True)
self.sigmoid = nn.Sigmoid()
def forward(self, hidden_states
共有 0 条评论