Method
_compute_signature
(tensor, tf_op, cast_to_f32=True)
Source from the content-addressed store, hash-verified
| 555 | return output_tensor |
| 556 | |
| 557 | def _compute_signature(tensor, tf_op, cast_to_f32=True): |
| 558 | if cast_to_f32: |
| 559 | tensor = math_ops.cast(tensor, dtypes.float32) |
| 560 | output_tensor = tf_op(tensor) |
| 561 | # The shape has to be 1. Set it if it does not have the information. |
| 562 | output_tensor = array_ops.reshape(output_tensor, [1]) |
| 563 | return output_tensor |
| 564 | |
| 565 | def _show_size(tensor): |
| 566 | # In order to check the size of a tensor. |
Callers
nothing calls this directly
Tested by
no test coverage detected