1
$\begingroup$

fashion MNIST dataset

You can download the FasionMNIST and unzip the data, you'll see that train-images-idx3-ubyte.

You may also use official ResourceData["FashionMNIST"] after Mathematica V12.

I'm using fashion MNIST dataset to train with SVM method via Classify.

I think MNIST can also reproduce this problem.

trainingBytes=Import["train-images-idx3-ubyte","Byte"];
trainingImages=Map[Image[Partition[#,28]]&,Partition[Drop[trainingBytes,16],28^2]];
testBytes=Import["t10k-images-idx3-ubyte","Byte"];
testImages=Map[Image[Partition[#,28]]&,Partition[Drop[testBytes,16],28^2]];
trainingLabels=Drop[Import["train-labels-idx1-ubyte","Byte"],8];
testLabels=Drop[Import["t10k-labels-idx1-ubyte","Byte"],8];
trainingSet=Thread[trainingImages->trainingLabels];
testSet=Thread[testImages->testLabels];

model = Classify[trainingSet, Method -> "SupportVectorMachine", 
PerformanceGoal -> "TrainingSpeed"]

It's possible to train successful by chance, but the FrontEnd will generate some stuck problems in the progressing, that means the loss and examples in the panel are stopped to update and FrontEnd may broken.

enter image description here

enter image description here

The lucky thing is in this case it costs only about 7 minutes, I got a model.

However, if I run the code in wolframscript, The training sample is always 10000/60000, after 17 minutes, it gives some updating.

|    17m10s     |      48000/60000       | SupportVectorMachine |       0.817       |     0.647     | 
|    21m54s     |      48000/60000       | SupportVectorMachine |       0.852       |     0.559     |
|    36m28s     |      48000/60000       | SupportVectorMachine |       0.852       |     0.559     |

I'm on Mac 2018 pro with Mathematica 13.1, I think something is wrong with this implementation.


Update

on Windows 10, seems FrontEnd problem is also happened.

Wolfram Mathematica Broken and Quit in Windows.

enter image description here

enter image description here

RandomSample 20000 training data is enough to reproduce the problem on Windows.

enter image description here

Not only for SVM method, other method can produce such phenomenon.

enter image description here

$\endgroup$
3
  • $\begingroup$ What is "train-images-idx3-ubyte"? $\endgroup$ Dec 20, 2022 at 16:02
  • $\begingroup$ @DanielLichtblau You can download the FasionMNIST and unzip the data, you'll see that. You may use official ResourceData["FashionMNIST"] $\endgroup$ Dec 20, 2022 at 16:05
  • $\begingroup$ @DanielLichtblau See update, dataset may be changed to MNIST I think. $\endgroup$ Dec 20, 2022 at 16:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.