Batched version of compute_similarity_transform.
(S1, S2)
| 242 | |
| 243 | |
| 244 | def compute_similarity_transform_batch(S1, S2): |
| 245 | """Batched version of compute_similarity_transform.""" |
| 246 | if S1.ndim == 2: |
| 247 | S1_hat = compute_similarity_transform(S1.copy(), S2.copy()) |
| 248 | else: |
| 249 | S1_hat = np.zeros_like(S1) |
| 250 | for i in range(S1.shape[0]): |
| 251 | S1_hat[i] = compute_similarity_transform(S1[i], S2[i]) |
| 252 | return S1_hat |
| 253 | |
| 254 | |
| 255 | def reconstruction_error(S1, S2): |
no test coverage detected