Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractDataSetIterator performance tweak #2823

Conversation

akhodakivskiy
Copy link

@akhodakivskiy akhodakivskiy commented Feb 5, 2017

The change is too call Nd4j.create() once instead of multiple Nd4j.create() followed by Nd4j.vstack(). This tweak gives me up to 10x performance boost - depending on the batch size and the number of features/labels. It's an important improvement for in-memory datasets because these iterators are called during training all the time.

@SusanBot
Copy link

SusanBot commented Feb 5, 2017

Jenkins Build Triggered

@SusanBot
Copy link

SusanBot commented Feb 5, 2017

Jenkins Build Started

@SusanBot
Copy link

SusanBot commented Feb 5, 2017

Build finished. 549 tests run, 13 skipped, 460 failed.

@SusanBot
Copy link

SusanBot commented Feb 5, 2017

Refer to this link for build results (access rights to CI server needed):
/job/deeplearning4j_PR/258/

Build result: FAILURE

[...truncated 445.14 KB...] at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:405)Caused by: java.io.FileNotFoundException: https://api.github.com/repos/deeplearning4j/deeplearning4j/statuses/305e7289264eb8eb35a38bf3e2915037a83908b0 at sun.reflect.GeneratedConstructorAccessor46.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890) at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at org.kohsuke.github.Requester.parse(Requester.java:535) at org.kohsuke.github.Requester._to(Requester.java:262) ... 12 moreCaused by: java.io.FileNotFoundException: https://api.github.com/repos/deeplearning4j/deeplearning4j/statuses/305e7289264eb8eb35a38bf3e2915037a83908b0 at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1836) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) at org.kohsuke.github.Requester.parse(Requester.java:525) ... 13 more

@raver119 raver119 merged commit e761425 into deeplearning4j:master Feb 5, 2017
@raver119
Copy link
Contributor

raver119 commented Feb 5, 2017

Looks great, thanks!

AlexDBlack added a commit that referenced this pull request May 21, 2018
* Additional workspace method

* NDArrayFactory: pullRows with result array

* Also add new method to sparse factories

* Additional debug info in workspace exceptions

* Add MemoryWorkspace.setPreviousWorkspace

* Remove condition in BaseNDArray.leverageTo

* Move WorkspaceMgr to ND4J

* Javadoc

* Add WorkspaceMgr.hasConfiguration(T)

* #2639 Workspace validation on leverage, detach, dup, etc

* Add WorkspaceMgr.assertOpen

* Additional validation for BaseWorkspaceMgr.notifyScopeBorrowed

* Additional Preconditions.checkArgument methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants