# tensorplay.ao.pruning.validate_pruning_amount Source: https://www.tensorplay.cn/docs/generated/tensorplay.ao.pruning.validate_pruning_amount.html ```python tensorplay.ao.pruning.validate_pruning_amount(amount: int, tensor_size: int) → None ``` Check that an absolute pruning count fits the data being pruned. Parameters: - amount – absolute number of units to prune. - tensor_size – number of units available for pruning. Raises: [ValueError](https://docs.python.org/3/builtins/exceptions.html#ValueError) – if amount exceeds tensor_size.