Skip to content

Instantly share code, notes, and snippets.

@bikashg
Created April 24, 2017 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bikashg/434f6d63441ecb352792689bed29ccb8 to your computer and use it in GitHub Desktop.
Save bikashg/434f6d63441ecb352792689bed29ccb8 to your computer and use it in GitHub Desktop.
ArrayList<Thread> myThreads = new ArrayList<Thread>();
for each epoch {
net.fit(trainSplitDataSetIterator);
Thread t = new Thread(new MYClass(net)); // The MYClass will use net to calculate some scores; it doesn't modify/update net
myThreads.add(t);
t.start();
}
for (Thread t:myThreads) {
t.join();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment