TensorStd computes a similarity / distance matrix on tensor using given Std metric function. Outer-most dimension ("rows") is used as "indexical" dimension and all other dimensions within that are compared. Results go in smat which is ensured to have proper square 2D shape (rows * rows). This Std
(smat tensor.Tensor, a tensor.Tensor, met metric.StdMetrics)
| 119 | // (rows * rows). |
| 120 | // This Std version is usable e.g., in Python where the func cannot be passed. |
| 121 | func TensorStd(smat tensor.Tensor, a tensor.Tensor, met metric.StdMetrics) error { |
| 122 | return Tensor(smat, a, metric.StdFunc64(met)) |
| 123 | } |
| 124 | |
| 125 | // TensorsStd computes a similarity / distance matrix on two tensors |
| 126 | // using given Std metric function. Outer-most dimension ("rows") is |