Fix validation (#8059)

Signed-off-by: AlexDBlack <blacka101@gmail.com>
master
Alex Black 2019-07-29 15:26:18 +10:00 committed by GitHub
parent 87d2b2cd3d
commit 0527ab8d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -160,12 +160,12 @@ public class RecordReaderDataSetIterator implements DataSetIterator {
*/ */
public RecordReaderDataSetIterator(RecordReader recordReader, int batchSize, int labelIndexFrom, int labelIndexTo, public RecordReaderDataSetIterator(RecordReader recordReader, int batchSize, int labelIndexFrom, int labelIndexTo,
boolean regression) { boolean regression) {
this(recordReader, new SelfWritableConverter(), batchSize, labelIndexFrom, labelIndexTo, -1, -1, regression);
if (!regression) { if (!regression) {
throw new IllegalArgumentException("This constructor is only for creating regression iterators. " + throw new IllegalArgumentException("This constructor is only for creating regression iterators. " +
"If you're doing classification you need to use another constructor that " + "If you're doing classification you need to use another constructor that " +
"(implicitly) specifies numPossibleLabels"); "(implicitly) specifies numPossibleLabels");
} }
this(recordReader, new SelfWritableConverter(), batchSize, labelIndexFrom, labelIndexTo, -1, -1, regression);
} }