MCPcopy Create free account
hub / github.com/NVlabs/tiny-cuda-nn / compute_error

Function compute_error

scripts/common.py:157–163  ·  view source on GitHub ↗
(metric, img, ref)

Source from the content-addressed store, hash-verified

155 raise ValueError(f"Unknown metric: {metric}.")
156
157def compute_error(metric, img, ref):
158 metric_map = compute_error_img(metric, img, ref)
159 metric_map[np.logical_not(np.isfinite(metric_map))] = 0
160 if len(metric_map.shape) == 3:
161 metric_map = np.mean(metric_map, axis=2)
162 mean = np.mean(metric_map)
163 return mean

Callers

nothing calls this directly

Calls 2

compute_error_imgFunction · 0.85
isfiniteMethod · 0.80

Tested by

no test coverage detected