-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexOutOfRangeException #44
Comments
I should add that TrainingFeedForwardNeuralNetwork() is working perfectly well so only TrainConvolutionalNeuralNetwork() is broken. I am using version 3.0.1. |
This must be an issue with NuGet package assemblies. The error does NOT reproduce if I compile latest source code from BrightWire. To repro, try downloading the NuGet package, and then running the sample code TrainConvolutionalNeuralNetwork (referencing binaries from NuGet). Sadly, this also means giving you an exact call stack is difficult as the NuGet package does not have PDBs. |
I'll take a look at the IndexOutOfRangeException but the correct nuget package should be:
This has been corrected in the BrightWire github readme |
Thank you Jack! Actually, it can reproduce the issue. The call stack is:
The exception originates from class TensorSegment on this setter: The index is out of range for _data. The size of the array is 1024, but the index is much higher. Not calling context.UseNumericsLinearAlgebra() causes this issue and is the root cause. This was the only call I could not make due to the missing NuGet package (your comment above). So a check that UseNumericsLinearAlgebra() was called (or the CUDA version) may be the right simple fix. PS: nice library and I like the way it's setup! |
In sample function TrainConvolutionalNeuralNetwork(), exception System.IndexOutOfRangeException: 'Index was outside the bounds of the array.' is returned on this call:
engine.Train(numIterations, testData, model =>
{
bestGraph = model.Graph;
});
This is using the provided sample code without changes.
This reproduces both using .NET 5.0 and .NET Core 3.1 compilation.
Additional issues:
The text was updated successfully, but these errors were encountered: