every blog every motto: You can do more than you think. https://blog.csdn.net/weixin_39190382?typeblog
0. 前言
记录torch.pairwise_distance
1. 一维
1.1 元素个数相同
1.1.1 元素个数为1
生成代码:
t torch.randn(1)
f torch.randn(1)计算代码,下…
Published in: Medical Image Analysis 2020
论文:https://www.sciencedirect.com/science/article/abs/pii/S1361841520302401 代码:https://github.com/renzhenwang/pairwise_segmentation 目录
Published in: Medical Image Analysis 2020
摘要
一…
做了一个比赛,其中为了更好的构建负样本,需要计算不同句子之间的相似性,句子大概有100w,句子向量是300维,中间踩了很多坑,记录一下。
暴力计算
最简单的idea是预分配一个100w x 100w的矩阵,一…