You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by ni...@apache.org on 2017/07/21 17:18:35 UTC
systemml git commit: [SYSTEMML-1774] Bugfix for NPE in relu backward
instruction
Repository: systemml
Updated Branches:
refs/heads/master 648eb21d6 -> eee35e984
[SYSTEMML-1774] Bugfix for NPE in relu backward instruction
Closes #579.
Project: http://git-wip-us.apache.org/repos/asf/systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/eee35e98
Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/eee35e98
Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/eee35e98
Branch: refs/heads/master
Commit: eee35e984aa1a810da1fadf294174e45dcca15bd
Parents: 648eb21
Author: Niketan Pansare <np...@us.ibm.com>
Authored: Fri Jul 21 09:18:20 2017 -0800
Committer: Niketan Pansare <np...@us.ibm.com>
Committed: Fri Jul 21 10:18:20 2017 -0700
----------------------------------------------------------------------
.../runtime/instructions/cp/ConvolutionCPInstruction.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/systemml/blob/eee35e98/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java
index f12cb7f..97a9a5a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java
@@ -222,12 +222,15 @@ public class ConvolutionCPInstruction extends UnaryCPInstruction
// (X > 0) * dout
MatrixBlock input = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
MatrixBlock dout = ec.getMatrixInput(_in2.getName(), getExtendedOpcode());
- MatrixBlock outputBlock = new MatrixBlock(input.getNumRows(), input.getNumColumns(), (input.isInSparseFormat() || dout.isInSparseFormat()));
+ MatrixBlock outputBlock;
if( !input.isEmpty() && !dout.isEmpty() ) {
- outputBlock.allocateDenseOrSparseBlock();
+ outputBlock = new MatrixBlock(input.getNumRows(), input.getNumColumns(), false);
+ outputBlock.allocateDenseBlock();
LibMatrixDNN.reluBackward(input, dout, outputBlock, _numThreads);
}
+ else
+ outputBlock = new MatrixBlock(input.getNumRows(), input.getNumColumns(), true);
// release inputs/outputs
ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());