Skip to content

Commit

Permalink
Workaround for INDArray.get rank1/2 issue (#7092)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDBlack committed Feb 5, 2019
1 parent 5e211ba commit 5d63924
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ public INDArray[] getOutputs(DifferentialFunction op, FrameIter outputFrameIter,
idx[0] = NDArrayIndex.point(i);
INDArray get = valuesArr.get(idx).dup();
int outIdx = idxs[i];
if(idxs.length == 2 && get.rank() == 2){
//Workaround for: https://github.com/deeplearning4j/deeplearning4j/issues/7092
get = get.reshape(get.length());
}
l.set(outIdx, get);
}

Expand Down

0 comments on commit 5d63924

Please sign in to comment.