I have a code:
this.weights_StoA = new List<List<double>>();
if (NETWORK_MODE == 0)
{
Random rand = new Random();
int count = enters.Count;
Parallel.For(0, HIDDEN_NEURONS_COUNT, (i, loopState) =>
{
List<double> weights = new List<double>();
for (int j = 0; j < count; j++)
{
weights.Add(rand.NextDouble());
}
lock (weights_StoA)
{
weights_StoA.Add(weights);
}
});
}
weights_StoA
is a List<List<double>>
.
I working with large arrays. HIDDEN_NEURONS_COUNT = 63480, entres.Conut = 126960
. This code throws System.OutOfMemoryException
. I tried to change architecture to x64 but it still throws the same exception.
How do I can fix this? I will be very grateful if you help me to solve this problem!