(start, end)
| 469 | all_encoder_layers = [] |
| 470 | |
| 471 | def custom(start, end): |
| 472 | |
| 473 | def custom_forward(*inputs): |
| 474 | layers = self.layer[start:end] |
| 475 | x_ = inputs[0] |
| 476 | for layer in layers: |
| 477 | x_ = layer(x_, inputs[1]) |
| 478 | return x_ |
| 479 | |
| 480 | return custom_forward |
| 481 | |
| 482 | if checkpoint_activations: |
| 483 | l = 0 |
nothing calls this directly
no outgoing calls
no test coverage detected