I am using DeepLearning4J and nd4j-cuda-10.2. all of the DataSet elements change to zero after I use the shuffle() method. I have traced the code and I think there is a problem with the registerAction() method.
DataSet data;
...
data.shuffle();
this is the data before shuffle:
===========INPUT===================
[[ 0, 0, 0, ... 0, 0, 16.0000],
[ 0, 0, 0, ... 0, 1.0000, 16.0000],
[ 1.0000, 0, 0, ... 0, 2.0000, 16.0000],
...,
[ 5.0000, 39.0000, 0, ... 25.0000, 19.0000, 16.0000],
[ 5.0000, 40.0000, 0, ... 25.0000, 19.0000, 16.0000],
[ 5.0000, 41.0000, 0, ... 25.0000, 19.0000, 16.0000]]
=================OUTPUT==================
[[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 0, 1.0000, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 0, 1.0000, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, 0, 0, 0, 1.0000],
[ 0, 1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 1.0000, 0, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, 0, 1.0000, 0, 0],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 1.0000, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, 0, 0, 0, 1.0000],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 1.0000, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 1.0000, 0, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 1.0000, 0, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, 0, 0, 1.0000],
[ 0, 0, 0, 1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 1.0000, 0, 0],
[ 0, 0, 1.0000, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, 0, 0, 1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 1.0000, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, 1.0000, 0, 0],
[ 0, 0, 1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, 1.0000, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, 0, 0, -1.0000],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, 0, -1.0000],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, 0, 0, -1.0000, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, -1.0000, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, -1.0000, 0, 0, 0],
[ 0, 0, 0, -1.0000, 0]]
and after:
===========INPUT===================
[[ 0, 0, 0, ... 0, 0, 0],
[ 0, 0, 0, ... 0, 0, 0],
[ 0, 0, 0, ... 0, 0, 0],
...,
[ 0, 0, 0, ... 0, 0, 0],
[ 0, 0, 0, ... 0, 0, 0],
[ 0, 0, 0, ... 0, 0, 0]]
=================OUTPUT==================
[[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0],
[ 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
if (result != null && !result.isEmpty()) {
AllocationPoint point = this.allocator.getAllocationPoint(result);
point.tickDeviceWrite();
INDArray[] var5 = operands;
int var6 = operands.length;
for(int var7 = 0; var7 < var6; ++var7) {
INDArray operand = var5[var7];
if (operand != null && !operand.isEmpty()) {
AllocationPoint pointOperand = this.allocator.getAllocationPoint(operand);
pointOperand.tickDeviceRead();
}
}
}
}