06 2023 档案
摘要:1.pom文件中添加:<build> <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> <plugins> <plugin>
阅读全文
摘要:1. bert为什么attention除以根号下d 原因:因为点积的数量级增长很大,因此将 softmax 函数推向了梯度极小的区域。 案例: 在没有除以根号d时, raw_tensor = torch.tensor([[2.1,3.3,0.5,-2.7]]) torch.softmax(raw_t
阅读全文
摘要:transformer中的模型分类: bert(自编码)、gpt(自回归)、bart(编码-解码) hidden_size (d) = num_attention_heads (m) * attention_head_size (a),也即 d=m*a, d为transformer模型输出的维度,这
阅读全文
摘要:因此,想要查看一个数组变量的地址,代码为: int arr[10]; cout << arr << endl; //注意,arr 之前无需 & 。 查看数组中第一个元素的地址: int arr[10]; cout << &arr[0] << endl; 递归:递归的过程是压栈的过程,递归结束,会出栈
阅读全文