Pytorch: using einsum to compute weighted feature-maps sum ...
stackoverflow.com › questions › 707616022 days ago · For every single image (indexed by the 0th dimension in the feature_maps tensor) and every single set of 512 weights, I want to compute the weighted sum (not average) of the 512 feature maps. The result should therefore have dimension [64, 4, 11, 11], i.e.: feature maps = [64, 512, 11,11] weights = [4, 512] result: [64, 4, 11, 11]