Deeplearning4j: libnd4j: space_to_batch op validation fails for CNN1d input case

Created on 30 Aug 2018  路  4Comments  路  Source: eclipse/deeplearning4j

Input: CNN 1d data, NHC format. (TF import test case)
Input shapes: input=[1,5,2], blocks=[1], padding=[1,2]

So we have M=1 spatial dimensions (2d CNN case would be M=2), hence we expect blocks to be size [1], and padding to be [1,2]
https://www.tensorflow.org/api_docs/python/tf/space_to_batch_nd

I think the problem here is that a rank 1, length 1 isn't considered a vector - hence fails validation with the following:

o.n.l.a.o.DynamicCustomOp - Op <space_to_batch>, isInplace: false
Error at [D:/jenkins/ws/dl4j-master-windows-x86_64-cpu/libnd4j/include/ops/declarable/generic/parity_ops/space_to_batch.cpp:54:0]:
SpaceToBatch: blocks supposed to be vector, but got 1D instead
Bug

All 4 comments

Fixed but not tested. Should be merged by raver tomorrow

space_to_batch is confirmed fixed now, thanks - unfortunately we've got the same thing for batch_to_space:
https://github.com/deeplearning4j/deeplearning4j/blob/master/libnd4j/include/ops/declarable/generic/parity_ops/batch_to_space.cpp#L67

thanks, fixed!

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zzyxzz picture zzyxzz  路  5Comments

Storm-cev picture Storm-cev  路  5Comments

AlexanderSerbul picture AlexanderSerbul  路  3Comments

tintinxue1 picture tintinxue1  路  5Comments

AlexDBlack picture AlexDBlack  路  4Comments