Remap the inputs of the subgraph. If the inputs of the original subgraph are [t0, t1, t2], remapping to [2,0] will create a new instance whose inputs is [t2, t0]. Note that this is only modifying the view: the underlying `tf.Graph` is not affected. Args: new_input_indice
(self, new_input_indices)
| 361 | return res |
| 362 | |
| 363 | def remap_inputs(self, new_input_indices): |
| 364 | """Remap the inputs of the subgraph. |
| 365 | |
| 366 | If the inputs of the original subgraph are [t0, t1, t2], remapping to [2,0] |
| 367 | will create a new instance whose inputs is [t2, t0]. |
| 368 | |
| 369 | Note that this is only modifying the view: the underlying `tf.Graph` is not |
| 370 | affected. |
| 371 | |
| 372 | Args: |
| 373 | new_input_indices: an iterable of integers or tf.Tensors |
| 374 | representing a mapping between the old inputs and the new ones. |
| 375 | Integers must be positive and smaller than the number of old inputs. |
| 376 | tf.Tensors must belong to the old list of inputs. |
| 377 | This mapping can be under-complete and must be without repetitions. |
| 378 | Returns: |
| 379 | A new modified instance of the original subgraph view with remapped |
| 380 | inputs. |
| 381 | """ |
| 382 | res = self.copy() |
| 383 | res._remap_inputs(new_input_indices) # pylint: disable=protected-access |
| 384 | return res |
| 385 | |
| 386 | def remap_outputs(self, new_output_indices): |
| 387 | """Remap the output of the subgraph. |