Eager-only version of Identity op; requires tensor is an eager Tensor.
(tensor, ctx)
| 58 | |
| 59 | |
| 60 | def _eager_identity(tensor, ctx): |
| 61 | """Eager-only version of Identity op; requires tensor is an eager Tensor.""" |
| 62 | attrs = ("T", tensor.dtype.as_datatype_enum) |
| 63 | result, = execute.execute( |
| 64 | b"Identity", 1, inputs=[tensor], attrs=attrs, ctx=ctx) |
| 65 | return result |
| 66 | |
| 67 | |
| 68 | def convert_to_eager_tensor(value, ctx, dtype=None): |
no test coverage detected