Created
June 21, 2017 10:12
-
-
Save micmn/0301a7fe8833842c5ad94a16c62ba33f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from multiprocessing import Process | |
import numpy as np | |
import modshogun | |
trainData = np.random.randn(294, 1605) | |
labels = np.random.randint(0, 2, 1605).astype('float64') | |
def f(): | |
model = modshogun.MCLDA(modshogun.RealFeatures(trainData),modshogun.MulticlassLabels(labels)) | |
model.train() | |
print("Training...", end='', flush=True) | |
f() | |
print("done.") | |
print("Spawning process ", end='', flush=True) | |
p = Process(target=f) | |
p.start() | |
print("(%i)..." % p.pid, end='', flush=True) | |
p.join() | |
print("done.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment