Пример #1
0
        private static Thread train_network_in_thread(Network net, Data d, float[] err)
        {
            var ptr = new TrainArgs
            {
                Net = net,
                D   = d,
                Err = err
            };
            var thread = new Thread(() => { train_thread(ptr); });

            thread.Start();
            return(thread);
        }
Пример #2
0
 private static void train_thread(TrainArgs ptr)
 {
     ptr.Err[0] = train_network(ptr.Net, ptr.D);
 }