(self, tensor, name)
| 606 | return tensor |
| 607 | |
| 608 | def _capture_helper(self, tensor, name): |
| 609 | capture = self._captures.get(ops.tensor_id(tensor)) |
| 610 | if capture is None: |
| 611 | placeholder = _create_substitute_placeholder( |
| 612 | tensor, name=name, dtype=tensor.dtype) |
| 613 | self.add_capture(tensor, placeholder) |
| 614 | else: |
| 615 | placeholder = capture[1] |
| 616 | tape.record_operation("captured_value", [placeholder], [tensor], |
| 617 | lambda x: [x]) |
| 618 | return placeholder |
| 619 | |
| 620 | @property |
| 621 | def captures(self): |
no test coverage detected