"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "4b4a90f233ff807994f8de78b1f9b1687b6328a4"
Commit 7c46feec authored by Lucas Beyer's avatar Lucas Beyer Committed by GitHub
Browse files

Merge pull request #20 from reynoldscem/patch-1

Fix off-by-one error in `compute_unary` utility function.
parents 31d4a725 1697e65f
......@@ -28,7 +28,7 @@ def compute_unary(labels, M, GT_PROB=0.5):
U = np.zeros((M, len(labels)), dtype='float32')
U[:, labels > 0] = n_energy
U[labels, np.arange(U.shape[1])] = p_energy
U[labels - 1, np.arange(U.shape[1])] = p_energy
U[:, labels == 0] = u_energy
return U
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment