class_docstr: Specifies to prune only 1x1 Conv2D layers in the model.
  
  PruneForLatencyOnXNNPack checks that the model contains a subgraph that can
  leverage XNNPACK's sparse inference and applies pruning wrapper only to
  Conv2D with `kernel_size = (1, 1)`.
  
  Reference:
    - [Fast Sparse ConvNets](https://arxiv.org/abs/1911.09723)
    - [XNNPACK Sparse Inference](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/xnnpack/README.md#sparse-inference) # pylint: disable=line-too-long
class_docstr_tok: ["Specifies","to","prune","only","1x1","Conv2D","layers","in","the","model",".","PruneForLatencyOnXNNPack","checks","that","the","model","contains","a","subgraph","that","can","leverage","XNNPACK","'s","sparse","inference","and","applies","pruning","wrapper","only","to","Conv2D","with","`","kernel_size","=","(","1",",","1",")","`",".","Reference",":","-","[","Fast","Sparse","ConvNets","]","(","https",":","\/\/arxiv.org\/abs\/1911.09723",")","-","[","XNNPACK","Sparse","Inference","]","(","https",":","\/\/github.com\/tensorflow\/tensorflow\/blob\/master\/tensorflow\/lite\/delegates\/xnnpack\/README.md","#","sparse-inference",")","#","pylint",":","disable=line-too-long"]
code: def _get_producers(self, layer):
      producers = set()
      for node in layer._inbound_nodes:
          if isinstance(node.inbound_layers, list):
              producers.update(node.inbound_layers)
          else:
              producers.add(node.inbound_layers)
      return producers
  
file_path: model-optimization/tensorflow_model_optimization/python/core/sparsity/keras/pruning_policy.py
imports: import abc
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import utils
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_wrapper
label_desc: Use image node_id 2 for calling the PruneForLatencyOnXNNPack obj's underlying member method code with example usage: obj._get_producers(layer) and returns: producers