# Problem of result of TopProbabilities in NetModel

Bug introduced in 11.3 and fixed in 12.0.0

I'm on Mathematica 11.3, Classify model could use TopProbabilities without designating an integer.

img=Import["https://i.stack.imgur.com/4MHkf.png"]
model=NetModel["VGG-16 Trained on ImageNet Competition Data"]
model[img,"TopProbabilities"]


How to solve this?

• You should post actual code instead of images of code. The message with the Rule is clearly a bug, and bugs should be reported to WRI. You seem to have found a workaround for this bug, but I would still recommend reporting it. – Jason B. Nov 21 '18 at 20:18

Fixed in Version 12, or upgrade your NeuralNetworks Framework.

PacletUpdate["NeuralNetworks"]


Remark:

This was caused by some bug in 11.3's decoder function.

In /Decoder/Classes.m, find function topProbs[labels_] and modify the return from

Map[Thread@*Apply[Rule], labelsValues, {-3}]


to

Map[Thread@*Apply[Rule], labelsValues, {Depth[input] - 2}]