<div><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi <span style="color:rgb(0,0,0);white-space:pre-wrap">Hi everyone,</span><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><div><span style="white-space:pre-wrap">I am writing a scikit-learn program to use MLPClassifier to learn Fashion-MNIST.</span></div><div><span style="white-space:pre-wrap">The following is the program. It's very simple.</span></div><div><span style="white-space:pre-wrap">When I ran it on Windows 10 (Core-i7-8565U, 1.8GHz, 16GB) note book, it took about 4 minutes.</span></div><div><span style="white-space:pre-wrap">However, when I ran it on MacBook(macOS), it took about 1 minutes.</span></div><div><span style="white-space:pre-wrap">Does anyone help me to understand  the reason why Windows 10 is so slow?</span></div><div><span style="white-space:pre-wrap">Am I missing something?</span></div><div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">Thanks,</span>  <span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap"><br></span></div><div><span style="white-space:pre-wrap">import os  
import gzip
import numpy as np

#from <a href="https://github.com/zalandoresearch/fashion-mnist/blob/master/utils/mnist_reader.py">https://github.com/zalandoresearch/fashion-mnist/blob/master/utils/mnist_reader.py</a>
def load_mnist(path, kind='train'):
  labels_path = os.path.join(path,'%s-labels-idx1-ubyte.gz' % kind)
  images_path = os.path.join(path,'%s-images-idx3-ubyte.gz' % kind)
  with gzip.open(labels_path, 'rb') as lbpath:
    labels = np.frombuffer(lbpath.read(), dtype=np.uint8, offset=8)
  with gzip.open(images_path, 'rb') as imgpath:
    images = np.frombuffer(imgpath.read(), dtype=np.uint8, offset=16)
    images = images.reshape(len(labels), 784)
  return images, labels

x_train, y_train = load_mnist('data', kind='train') 
x_test, y_test = load_mnist('data', kind='t10k') 

from sklearn.neural_network import MLPClassifier
import time
import datetime

print(datetime.datetime.today())
start = time.time() 
mlp = MLPClassifier() 
mlp.fit(x_train, y_train) 
print((time.time() - start)/ 60)
</span></div><div><span style="white-space:pre-wrap"><br></span></div><div><br></div></font><div><div><div dir="ltr" class="gmail_signature">---<br>MATSUDA, Kouichi, Ph.D.</div></div></div></div></div></div><span></span></div>
</div></div>