class_docstr: A structured pruning algorithm that prunes the filters with the
  smallest APoZ(average percentage of zeros) of output activations.
  Hengyuan Hu, Rui Peng, Yu-Wing Tai and Chi-Keung Tang,
  "Network Trimming: A Data-Driven Neuron Pruning Approach towards Efficient Deep Architectures", ICLR 2016.
  https://arxiv.org/abs/1607.03250
class_docstr_tok: ["A","structured","pruning","algorithm","that","prunes","the","filters","with","the","smallest","APoZ","(","average","percentage","of","zeros",")","of","output","activations",".","Hengyuan","Hu",",","Rui","Peng",",","Yu-Wing","Tai","and","Chi-Keung","Tang",",","''","Network","Trimming",":","A","Data-Driven","Neuron","Pruning","Approach","towards","Efficient","Deep","Architectures","''",",","ICLR","2016.","https",":","\/\/arxiv.org\/abs\/1607.03250"]
docstr: Calculate APoZ(average percentage of zeros) of activations.
  
  Parameters
  ----------
  activations : list
      Layer's output activations
  
  Returns
  -------
  torch.Tensor
      Filter's APoZ(average percentage of zeros) of the activations
docstr_tok: ["Calculate","APoZ","(","average","percentage","of","zeros",")","of","activations",".","Parameters","--","--","--","--","--","activations",":","list","Layer","'s","output","activations","Returns","--","--","--","-","torch.Tensor","Filter","'s","APoZ","(","average","percentage","of","zeros",")","of","the","activations"]
code: def _calc_apoz(self, activations):
      """
      Calculate APoZ(average percentage of zeros) of activations.
  
      Parameters
      ----------
      activations : list
          Layer's output activations
  
      Returns
      -------
      torch.Tensor
          Filter's APoZ(average percentage of zeros) of the activations
      """
      activations = torch.cat(activations, 0)
      _eq_zero = torch.eq(activations, torch.zeros_like(activations))
      _apoz = torch.sum(
          _eq_zero, dim=(0, 2, 3), dtype=torch.float64
      ) / torch.numel(_eq_zero[:, 0, :, :])
      return torch.ones_like(_apoz) - _apoz
  
imports: import logging
  import math
  import numpy
  import torch
  from .weight_masker import WeightMasker
label_desc: Use image node_id 2 for calling the ActivationAPoZRankFilterPrunerMasker obj's underlying member method code with example usage: obj._calc_apoz(activations) and returns: unknown