A fake composite tensor class, for testing type-based dispatching.
| 31 | |
| 32 | |
| 33 | class CustomTensor(object): |
| 34 | """A fake composite tensor class, for testing type-based dispatching.""" |
| 35 | |
| 36 | def __init__(self, tensor, score): |
| 37 | self.tensor = ops.convert_to_tensor(tensor) |
| 38 | self.score = score |
| 39 | |
| 40 | |
| 41 | @tf_export("test_op") |
no outgoing calls