(*inputs)
| 352 | local_micro_offset = self.micro_offset + 1 |
| 353 | |
| 354 | def exec_func(*inputs): |
| 355 | # Single tensor inputs need to be unwrapped |
| 356 | if len(inputs) == 1: |
| 357 | inputs = inputs[0] |
| 358 | for idx, layer in enumerate(self.forward_funcs[start:end]): |
| 359 | self.curr_layer = idx + self._local_start |
| 360 | if self.seed_layers: |
| 361 | new_seed = (self.base_seed * local_micro_offset) + self.curr_layer |
| 362 | if self.seed_fn: |
| 363 | self.seed_fn(new_seed) |
| 364 | else: |
| 365 | ds_utils.set_random_seed(new_seed) |
| 366 | |
| 367 | inputs = layer(inputs) |
| 368 | return inputs |
| 369 | |
| 370 | return exec_func |
| 371 |
nothing calls this directly
no outgoing calls
no test coverage detected