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

DL4J: CuDNN NPE on style transfer #6358

Closed
AlexDBlack opened this Issue Sep 4, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@AlexDBlack
Copy link
Member

AlexDBlack commented Sep 4, 2018

https://gist.github.com/tvanh/25f4f8586d9da3f2caaa63e54c1f43c8

09:26:24.498 [main] WARN org.deeplearning4j.nn.layers.convolution.ConvolutionLayer - CuDNN execution failed - falling back on built-in implementation
java.lang.NullPointerException: null
at org.deeplearning4j.nn.workspace.LayerWorkspaceMgr.getHelperWorkspace(LayerWorkspaceMgr.java:99)
at org.deeplearning4j.nn.layers.convolution.CudnnConvolutionHelper.preOutput(CudnnConvolutionHelper.java:460)
at org.deeplearning4j.nn.layers.convolution.ConvolutionLayer.preOutput(ConvolutionLayer.java:342)
at org.deeplearning4j.nn.layers.convolution.ConvolutionLayer.preOutput4d(ConvolutionLayer.java:246)
at org.deeplearning4j.nn.layers.convolution.ConvolutionLayer.backpropGradient(ConvolutionLayer.java:146)
at anhtv.ai.dl.NeuralStyleTransfer.backPropagate(NeuralStyleTransfer.java:265)
at anhtv.ai.dl.NeuralStyleTransfer.backPropagateStyles(NeuralStyleTransfer.java:143)
at anhtv.ai.dl.NeuralStyleTransfer.transferStyle(NeuralStyleTransfer.java:118)
at anhtv.ai.dl.NeuralStyleTransfer.main(NeuralStyleTransfer.java:99)

@AlexDBlack AlexDBlack added the DL4J label Sep 4, 2018

@AlexDBlack AlexDBlack self-assigned this Sep 4, 2018

AlexDBlack added a commit that referenced this issue Sep 5, 2018

@AlexDBlack AlexDBlack referenced this issue Sep 5, 2018

Merged

DL4J Issues #6370

@AlexDBlack

This comment has been minimized.

Copy link
Member

AlexDBlack commented Sep 5, 2018

@tvanh Fixed here: #6370

Edit: this is a probable workaround for 1.0.0-beta2:

            LayerWorkspaceMgr mgr = LayerWorkspaceMgr.noWorkspaces();
            mgr.setHelperWorkspacePointers(new HashMap<String, Pointer>());
            dLdANext = layer.backpropGradient(dLdANext, mgr).getSecond();
@tvanh

This comment has been minimized.

Copy link

tvanh commented Sep 5, 2018

Tyvm

AlexDBlack added a commit that referenced this issue Sep 7, 2018

DL4J Issues (#6370)
* #6358 Fix issue with LayerWorkspaceMgr when used directly in conjunction with CuDNN

* 6326 RnnOutputLayer + CompGraph + Dropout fix

* Another test + improve RnnOutputLayer error

* #6368 Fix MultiLayerNetwork pretrainLayer iterator reset supported check

* #6352 fix use of assert keywork for argument validation in ND4J

* #6352 more assert keyword fixes

* #6366 RecordReaderMultiDataSetIterator: better validation/errors; 5D (3D CNN) NDArrayWritable support

* Cleanup

* Compilation fix

* More cleanup

* Removed method fix

* More fixes
@lock

This comment has been minimized.

Copy link

lock bot commented Oct 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Oct 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.