Reputation: 3537
please consider the following code:
#update
W1 = W1 - learningRate * dJdW1
W2 = W2 - learningRate * dJdW2
Where learningRate is double and dJdW1/dJdW1 2d matrices.
I'm getting this error:
ERROR: Runtime error in program block generated from statement block between lines 58 and 61 -- Error evaluating instruction: CP\xb0-*\xb0W2\xb7MATRIX\xb7DOUBLE\xb01.0E-5\xb7SCALAR\xb7DOUBLE\xb7true\xb0dJdW2\xb7MATRIX\xb7DOUBLE\xb0_mVar117\xb7MATRIX\xb7DOUBLE
EDIT 12.7.17:
plus this one...
ordinal not in range(128)'))
The whole DML can be found here
The complete Error can be found here
The whole jupyther notebook can be found here
Upvotes: 0
Views: 43
Reputation: 86
The cellwise scalar matrix operation is fine. Looking at your error, it says that your matrix/vector dimensions are not compatible:
: Block sizes are not matched for binary cell operations: 3x1 vs 2x3
org.apache.sysml.runtime.matrix.data.MatrixBlock.binaryOperations(MatrixBlock.java:2872)
org.apache.sysml.runtime.instructions.cp.PlusMultCPInstruction.processInstruction(PlusMultCPInstruction.java:66)
org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:290)
Looking at your Notebook, this comes from:
W2 = W2 - learningRate * dJdW2
W2 is initialized W2 = rand(rows=hiddenLayerSize,cols=outputLayerSize) as a 3x1 matrix, while dJDW2 is a 2x3 matrix.
Upvotes: 1