void Start() { CsvReader.readCSVFile("TrainningData\\" + trainningFile, ref inputList, ref outputList); trainningInput = inputList.ToArray(); trainningOuput = outputList.ToArray(); // MlDllWrapper.InitRBF(trainningInput, trainningInput.Length, 784, trainningOuput, // trainningOuput.Length, 10, 500); _inputSize = npl[0]; _outputSize = npl.Last(); numberLayer = npl.Length; // // if (CsvReader.inputCount != _inputSize) { Debug.LogError( $"Input Length ({CsvReader.inputCount}) in CSV File don't match the npl input length ({_inputSize})"); } if (CsvReader.outputCount != _outputSize) { Debug.LogError( $"Output Length ({CsvReader.outputCount}) in CSV File don't match the npl output length ({_outputSize})"); } //MyModel = MlDllWrapper.CreateLinearModel(modelSize); // //CreateLinearMulticlass(); // // if (isRandomized) { randomizeSpheres(minRandom, maxRandom); } // testDataSet = new List <double[]>(); // // foreach (sphereExposer sphere in spheres) { Vector3 pos = sphere.myTransform.position; double[] tmp = new[] { (double)pos.x, pos.y }; testDataSet.Add(tmp); // } // // // // //trainModel(); // // // // //predictOnDataSet(); // // MyModel = MlDllWrapper.CreateMLPModel(numberLayer, npl); } // Update is called once per frame }
// Start is called before the first frame update void Start() { CsvReader.readCSVFile("TrainningData\\inputCsv.csv", ref inputList, ref outputList); trainningInput = inputList.ToArray(); trainningOuput = outputList.ToArray(); _inputSize = npl[0]; _outputSize = npl.Last(); numberLayer = npl.Length; if (CsvReader.inputCount != _inputSize) { Debug.LogError($"Input Length ({CsvReader.inputCount}) in CSV File don't match the npl input length ({_inputSize})"); } if (CsvReader.outputCount != _outputSize) { Debug.LogError($"Output Length ({CsvReader.outputCount}) in CSV File don't match the npl output length ({_outputSize})"); } MyModel = MlDllWrapper.CreateMLPModel(numberLayer, npl); }