Skip to content

Commit

Permalink
split shapefn fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raver119 committed Apr 19, 2019
1 parent 25401a9 commit e656c16
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions libnd4j/include/ops/declarable/generic/parity_ops/split.cpp
Expand Up @@ -133,9 +133,9 @@ namespace ops {

//Edge case: splitting empty array (mainly for TF import compatibility) -> return N empty arrays
if(INPUT_VARIABLE(inputVar)->isEmpty()){
Nd4jLong* empty = ShapeBuilders::createScalarShapeInfo(dataType, block.getWorkspace());
ArrayOptions::setPropertyBit(empty, ARRAY_EMPTY);
for (int e = 0; e < num_splits; e++) {
auto empty = ShapeBuilders::createScalarShapeInfo(dataType, block.getWorkspace());
ArrayOptions::setPropertyBit(empty, ARRAY_EMPTY);
shapes->push_back(empty);
}
return shapes;
Expand All @@ -156,8 +156,7 @@ namespace ops {
shape[e] = shape::sizeAt(input, e);

for (int e = 0; e < num_splits; e++) {

Nd4jLong *newShape = ShapeBuilders::createShapeInfo(dataType, shape::order(input), shape, block.getWorkspace());
auto newShape = ShapeBuilders::createShapeInfo(dataType, shape::order(input), shape, block.getWorkspace());
shapes->push_back(newShape);
}

Expand Down

0 comments on commit e656c16

Please sign in to comment.