我有一个小批量,大小为nxtxwxh,其中N是小批量的大小,D是尺寸,W和H分别是宽度和高度。假设我有一组过滤器F,每个过滤器的尺寸都是Dx1x1。我需要计算小批量和过滤器之间的成对距离。输出的大小应为NxFxWxH。在
input: NxDxWxH
filters: FxDx1x1
output: NxFxWxH
Lets assume a is a vector of size D extracted at the location (x,y)
of the input and f is filter of size Dx1x1. Each value in the output
should be \sum_{d=1}^D (x_d - f_c)^2
换句话说,不是卷积,我试图找出L2对距离。在
我怎么能在Pythorch里做到这一点?在
您可以通过扩展输入和过滤器来实现正确的自动形状铸造。在
相关问题 更多 >
编程相关推荐