10 2022 档案

摘要:TypeError: slice indices must be integers or None or have an __index__ method 原因1:存在带除法的操作,“/”会生成浮点数,需要将除法符号“/”更改成“//”。 原因2:“[]”中的数据变成了浮点数,不能作为数组下标,需要 阅读全文
posted @ 2022-10-05 12:04 fengzlj 阅读(311) 评论(0) 推荐(0) 编辑
摘要:clone()、detach() torch.nn.CosineSimilarity() torch.nn.CosineSimilarity(dim=1, eps=1e-08):返回x1和x2之间的余弦相似度,沿dim计算。 ''' 输入 1:(∗1,D,∗2) 其中 D 位于位置 dim 输入2: 阅读全文
posted @ 2022-10-05 11:33 fengzlj 阅读(64) 评论(0) 推荐(0) 编辑

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