-
I am trying to make my custom dataset as AND gate. Dataset is below : My code runs OK for a first epoch, but error at second epoch. What is the solution for this error ? --- std out --- Training: 100% |========================================|
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Based on your stacktrace, it seems your dataset returned an empty |
Beta Was this translation helpful? Give feedback.
-
Can you create check in your code in a repo that I can test your code? |
Beta Was this translation helpful? Give feedback.
-
@iamuspace The There are two ways to resolve this issue:
|
Beta Was this translation helpful? Give feedback.
-
@frankfliu I have question can you tell me is there any specific reason you selected batch size as 4 ? |
Beta Was this translation helpful? Give feedback.
@iamuspace
In your [
AndGetDataset.get(NDManager manager, long index)
](public Record get(NDManager manager, long index)) function, you returned the NDArray of the dataset directly.The
NDArray
returned from this function will be closed automatically after being used. That's why you see the exception in 2nd epoch.There are two ways to resolve this issue:
Record
close()
method to prevent DataIterator to close it.