From 8dffb3dd5e024673a0f901d2768147d52d0a0e7c Mon Sep 17 00:00:00 2001 From: txzhao Date: Fri, 8 Sep 2017 13:33:36 +0200 Subject: [PATCH] update deprecated function softmax_to_unary --- image_segmentation_conditional_random_fields.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/image_segmentation_conditional_random_fields.ipynb b/image_segmentation_conditional_random_fields.ipynb index bd7cfbc..c9ada1f 100644 --- a/image_segmentation_conditional_random_fields.ipynb +++ b/image_segmentation_conditional_random_fields.ipynb @@ -768,7 +768,9 @@ "\n", "# The input should be the negative of the logarithm of probability values\n", "# Look up the definition of the softmax_to_unary for more information\n", - "unary = softmax_to_unary(processed_probabilities)\n", + "# unary = softmax_to_unary(processed_probabilities)\n", + "# softmax_to_unary has deprecated, use `unary_from_softmax` instead.\n", + "unary = unary_from_softmax(softmax, scale=None, clip=1e-5)\n", "\n", "# The inputs should be C-continious -- we are using Cython wrapper\n", "unary = np.ascontiguousarray(unary)\n",