propagate_channel_pruning

Function propagate_channel_pruning 

Source
pub fn propagate_channel_pruning(
    graph: &DependencyGraph,
    source_layer: &str,
    pruned_channels: &[usize],
) -> HashMap<String, Vec<usize>>
Expand description

Propagate channel pruning through a dependency graph.

When output channels are pruned from a layer, this function determines which input channels of downstream layers must also be pruned.

§Arguments

  • graph - The dependency graph
  • source_layer - Layer where channels are being pruned
  • pruned_channels - Indices of channels being removed

§Returns

Map of layer_id -> input channels to remove