the question about the function 5 in the paper
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 25/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
调研方向
从 issue 中所示的 masked_log_softmax 函数开始,并结合阅读所引用论文中的函数 (5)。阐明 masking 如何与 log-softmax 的计算相关,以及分子表示什么;添加能够回答该问题的清晰说明即视为完成。
由索引模型根据 Issue 内容生成。
描述
def masked_log_softmax(vector: torch.Tensor, mask: torch.BoolTensor, dim: int = -1) -> torch.Tensor:
if mask is not None:
while mask.dim() < vector.dim():
mask = mask.unsqueeze(1)
# vector + mask.log() is an easy way to zero out masked elements in logspace, but it
# results in nans when the whole vector is masked. We need a very small value instead of a
# zero in the mask for these cases.
vector = vector + (mask + tiny_value_of_dtype(vector.dtype)).log()
return torch.nn.functional.log_softmax(vector, dim=dim)
So sorry, I can not understand: why just mask the (vector=type_linear_output @ span_linear_output) before inputting the vector to the log_softmax function, how to make sure the numerator (exp(sim(s_i,j, ek))) in function (5) is the positive?
- 主要语言
- Python
- 星标
- 96
- 派生
- 23
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/binder 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 20/100
-
process datasets未关闭
难度 3/5 1-2 天 新手友好度 30/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 20/100
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
letsencrypt/cp-cps#353 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 84/100
PedestrianDynamics/pyFDS-Evac#394 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
DOI-USGS/pywatershed#421 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
python-pillow/Pillow#10087 · 1 条评论 ·
维护者通常 1 天内回复