Beispiel #1
0
        /// <summary>
        /// Creates a classification neural network from a string that contains network architecture.
        /// </summary>
        /// <param name="architecture">The network architecture.</param>
        /// <returns>The <see cref="Network"/> object this method creates.</returns>
        public static Network FromArchitecture(string architecture)
        {
            NetworkGraph graph = NetworkGraphBuilder.CreateNetworkGraph(architecture, true, false);

            return(new Network(graph));
        }
        /// <summary>
        /// Creates a classification neural network from a string that contains network architecture.
        /// </summary>
        /// <param name="architecture">The network architecture.</param>
        /// <param name="classes">The classes the network should able to classify into.</param>
        /// <param name="allowedClasses">The classes the network is allowed to classify.</param>
        /// <param name="blankClass">The blank class that represents none of the real classes.</param>
        /// <returns>
        /// The <see cref="ClassificationNetwork"/> object this method creates.
        /// </returns>
        public static ClassificationNetwork FromArchitecture(string architecture, IList <string> classes, IList <string> allowedClasses, string blankClass)
        {
            NetworkGraph graph = NetworkGraphBuilder.CreateNetworkGraph(architecture, true, true);

            return(new ClassificationNetwork(graph, classes, allowedClasses, blankClass));
        }