主页
0
PromptBERT: Improving BERT Sentence Embeddings with Prompt
PromptBERT: Improving BERT Sentence Embeddings with PromptAbstract本文认为,原始BERT模型在句子语义相似度任务上表现不佳的原因: 静态token嵌入偏差 (static token embeddings biases) 无效的BERT层 (ineffective BERT layers) 而不是因为BERT生成的句子表示的余弦
0
PyTorch-SGD-求函数最优值
面试遇到的一个基础问题:使用PyTorch求一个函数的最优值代码如下: import torch.optim as optim import torch # 参数为x,(1,1) x = torch.randn([1],requires_grad=True) def function(x): return x**2 - 2*x + 1 optimizer = optim.SGD([x