Permalink
Browse files

shapeInfo being printed out on mismatched shape

  • Loading branch information...
1 parent e0c76bb commit b6f2dabf957eb79376697cbf8446e4c6f1c81ea8 @raver119 raver119 committed Jan 10, 2017
@@ -1470,7 +1470,7 @@ protected CudaContext invoke(ScalarOp op) {
validateDataType(Nd4j.dataType(), op);
if (op.x().length() != op.z().length())
- throw new ND4JIllegalStateException("op.X length should be equal to op.Y length: ["+op.x().length()+"] != [" + op.z().length()+"]");
+ throw new ND4JIllegalStateException("op.X length should be equal to op.Y length: ["+Arrays.toString(op.x().shapeInfoDataBuffer().asInt())+"] != [" + Arrays.toString(op.z().shapeInfoDataBuffer().asInt())+"]");
if (extraz.get() == null)
extraz.set(new PointerPointer(32));
@@ -466,7 +466,7 @@ private void exec(ScalarOp op) {
validateDataType(Nd4j.dataType(), op);
if (op.x().length() != op.z().length())
- throw new ND4JIllegalStateException("op.X length should be equal to op.Y length: ["+op.x().length()+"] != [" + op.z().length()+"]");
+ throw new ND4JIllegalStateException("op.X length should be equal to op.Y length: ["+Arrays.toString(op.x().shapeInfoDataBuffer().asInt())+"] != [" + Arrays.toString(op.z().shapeInfoDataBuffer().asInt())+"]");
if (op.getDimension() != null) {
invoke(op, op.getDimension());

0 comments on commit b6f2dab

Please sign in to comment.