Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Exception in thread "main" java.lang.NegativeArraySizeException while invoking totalOutcomes() on RecordReaderDataSetIterator #7140
Please describe our issue, along with:
- encountered behavior
Please indicate relevant versions, including, if relevant:
You can use the below gist as reference to code:
Let me know if further inputs required. Thank you.
Aha! Link: https://skymindai.aha.io/features/ND4J-114
OK, turns out this was a simple one: your data has 7 columns, hence should be indexed 0 to 6 inclusive, but you're indexing 0 to 7 (as if you had 8 total columns).
As an aside, looks like you've got features and labels reversed... this might be what you want?
(You can also do the same with the constructors instnead of the builder)
Edit: I'll add some better validation so it's more obvious what the problem actually is.
I checked the schema transformation process too. Schema had total 8 columns. Then it was passed to transformation process:
At the end it's still having 8 columns as per my calculation. So I was trying to figure out how the index bound is still rounded to 6 instead of 7.