06 2023 档案

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

点击右上角即可分享
微信分享提示