(self, *args)
| 277 | """ |
| 278 | |
| 279 | def __init__(self, *args): |
| 280 | self._pruning_methods: Tuple["BasePruningMethod", ...] = tuple() |
| 281 | if not isinstance(args, Iterable): # only 1 item |
| 282 | self._tensor_name = args._tensor_name |
| 283 | self.add_pruning_method(args) |
| 284 | elif len(args) == 1: # only 1 item in a tuple |
| 285 | self._tensor_name = args[0]._tensor_name |
| 286 | self.add_pruning_method(args[0]) |
| 287 | else: # manual construction from list or other iterable (or no args) |
| 288 | for method in args: |
| 289 | self.add_pruning_method(method) |
| 290 | |
| 291 | def add_pruning_method(self, method): |
| 292 | r"""Adds a child pruning ``method`` to the container. |
nothing calls this directly
no test coverage detected