(tensor, ndims=2)
| 53 | |
| 54 | |
| 55 | def _FlatOuterDims(tensor, ndims=2): |
| 56 | shape = list(tensor.shape) |
| 57 | return tensor.reshape(shape[:ndims - 1] + [ |
| 58 | functools.reduce(lambda x, y: x * y, shape[ndims - 1:], 1) |
| 59 | ]) |
| 60 | |
| 61 | |
| 62 | def _NumpyScatterNd(ref, indices, updates, op): |
no test coverage detected