Remap in the place the inputs and/or outputs to the default mapping. Args: remove_input_map: if True the input map is reset to the default one. remove_output_map: if True the output map is reset to the default one.
(self, remove_input_map=True, remove_output_map=True)
| 263 | return copy.copy(self) |
| 264 | |
| 265 | def _remap_default(self, remove_input_map=True, remove_output_map=True): |
| 266 | """Remap in the place the inputs and/or outputs to the default mapping. |
| 267 | |
| 268 | Args: |
| 269 | remove_input_map: if True the input map is reset to the default one. |
| 270 | remove_output_map: if True the output map is reset to the default one. |
| 271 | """ |
| 272 | if not remove_input_map and not remove_output_map: |
| 273 | return |
| 274 | |
| 275 | # Compute inside and outside tensor |
| 276 | inputs, outputs, _ = select.compute_boundary_ts(self._ops) |
| 277 | if remove_input_map: |
| 278 | self._input_ts = list(inputs) + self._passthrough_ts |
| 279 | if remove_output_map: |
| 280 | self._output_ts = list(outputs) + self._passthrough_ts |
| 281 | |
| 282 | def remap_default(self, remove_input_map=True, remove_output_map=True): |
| 283 | """Remap the inputs and/or outputs to the default mapping. |