class_docstr: A filter pruner via geometric median.
  "Filter Pruning via Geometric Median for Deep Convolutional Neural Networks Acceleration",
  https://arxiv.org/pdf/1811.00250.pdf
class_docstr_tok: ["A","filter","pruner","via","geometric","median",".","``","Filter","Pruning","via","Geometric","Median","for","Deep","Convolutional","Neural","Networks","Acceleration","''",",","https",":","\/\/arxiv.org\/pdf\/1811.00250.pdf"]
docstr: Calculate the total distance between a specified filter (by out_idex and in_idx) and
  all other filters.
  Parameters
  ----------
  weight: Tensor
      convolutional filter weight
  out_idx: int
      output channel index of specified filter, this method calculates the total distance
      between this specified filter and all other filters.
  Returns
  -------
  float32
      The total distance
docstr_tok: ["Calculate","the","total","distance","between","a","specified","filter","(","by","out_idex","and","in_idx",")","and","all","other","filters",".","Parameters","--","--","--","--","--","weight",":","Tensor","convolutional","filter","weight","out_idx",":","int","output","channel","index","of","specified","filter",",","this","method","calculates","the","total","distance","between","this","specified","filter","and","all","other","filters",".","Returns","--","--","--","-","float32","The","total","distance"]
code: def _get_distance_sum(self, weight, out_idx):
      """
      Calculate the total distance between a specified filter (by out_idex and in_idx) and
      all other filters.
      Parameters
      ----------
      weight: Tensor
          convolutional filter weight
      out_idx: int
          output channel index of specified filter, this method calculates the total distance
          between this specified filter and all other filters.
      Returns
      -------
      float32
          The total distance
      """
      logger.debug("weight size: %s", weight.size())
      assert len(weight.size()) in [3, 4], "unsupported weight shape"
  
      w = weight.view(weight.size(0), -1)
      anchor_w = w[out_idx].unsqueeze(0).expand(w.size(0), w.size(1))
      x = w - anchor_w
      x = (x * x).sum(-1)
      x = torch.sqrt(x)
      return x.sum()
  
imports: import logging
  import math
  import numpy
  import torch
  from .weight_masker import WeightMasker
label_desc: Use image node_id 3 for calling the FPGMPrunerMasker obj's underlying member method code with example usage: obj._get_distance_sum(weight, out_idx) and returns: x