For a similar problem, I am trying to modify the code here (https://www.wolfram.com/language/11/image-and-signal-processing/image-recognition-using-deep-learning.html?product=mathematica) so that the distance between the prediction and the label matters, not merely right or wrong. That is, in that example, predicting a 7 instead of 9 is much better than predicting a 1.

Edit: Rather then using a "Class" for the NetDecoder, I am using a "Scalar."

Edit 2: To make my question more clear, I think I have modified the code by essentially switching from "Class" to "Scalar" and predicting a continuum) and removing the softmax layer. I just was wondering the most elegant way to predict a use something like the digit recognition architecture to predict a continuous quantity (so mistaking a 9 for a 7 is better then for a 1).

  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Feb 8 '18 at 3:25
  • $\begingroup$ If I read the question correctly, you're telling us you're working on an exercise (to modify an existing example). That's fine and good luck, but I do not see where you ask an actual question. $\endgroup$ – Michael E2 Feb 8 '18 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.