コード例 #1
0
        public PostureRecognition(PatternType patternType, DataTrainingType dataTrainingType, int iterations)
        {
            this.networkPattern = PatternResolver <InputDataType, OutputDataType> .ResolvePattern(patternType, dataTrainingType);

            var activationFunction = new ActivationFunction();

            activationFunction.InitializeSigmodeFunction(1.0);
            network = new NeuronNetwork(activationFunction, iterations);
        }
コード例 #2
0
        public static INeuralNetworkPattern <InputDataType, OutputDataType> ResolvePattern(PatternType patternType, DataTrainingType dataTrainigType)
        {
            var dataTrainingT = DataTrainingResolver <InputDataType, OutputDataType> .ResolveDataTraining(dataTrainigType);

            NeuralNetworkPatternBase <InputDataType, OutputDataType> neuralNetworkPattern;

            switch (patternType)
            {
            case PatternType.AnglePatternAll:
                neuralNetworkPattern = new AnglePatternAll <InputDataType, OutputDataType>();
                break;

            case PatternType.AnglePatternElbowKnee:
                neuralNetworkPattern = new AnglePatternElbowKnee <InputDataType, OutputDataType>();
                break;

            default:
                throw new ArgumentException("Not Pattern Found");
            }
            neuralNetworkPattern.DataTrainingResolver = dataTrainingT;

            return(neuralNetworkPattern);
        }
コード例 #3
0
        public static IDataTraining <InputDataType, OutputDataType> ResolveDataTraining(DataTrainingType patternType)
        {
            switch (patternType)
            {
            case DataTrainingType.DataTrainingFile:
                return(new DataTrainingFile <InputDataType, OutputDataType>());

            default:
                throw new ArgumentException("Not DataTrainingType Found");
            }
        }