Пример #1
0
        public double[] Weights = new double[128 * 1024]; // 128k weights (e.g. a small CNN model)

        public static TrainedWeights Create()
        {
            var rnd    = new Random(15);
            var result = new TrainedWeights();

            for (var i = 0; i < result.Weights.Length; i++)
            {
                result.Weights[i] = rnd.NextDouble();
            }

            return(result);
        }
Пример #2
0
        public static TrainedWeights Create()
        {
            var rnd    = new Random(15);
            var result = new TrainedWeights {
                Weights = new double[64 * 1024]
            };                                                                 // 64k weights (e.g. a small CNN model)

            for (var i = 0; i < result.Weights.Length; i++)
            {
                result.Weights[i] = rnd.NextDouble();
            }

            return(result);
        }