Exemplo n.º 1
0
        public static string Serialize(ManagedNN network)
        {
            var model = Convert(network);

            var output = JsonConvert.SerializeObject(model);

            return(output);
        }
Exemplo n.º 2
0
        public static ManagedNNJSON Convert(ManagedNN network)
        {
            var model = new ManagedNNJSON()
            {
                Wji = Convert2D(network.Wji),
                Wkj = Convert2D(network.Wkj)
            };

            return(model);
        }
Exemplo n.º 3
0
        public static ManagedNN DeserializeNN(string json)
        {
            var model = JsonConvert.DeserializeObject <ManagedNNJSON>(json);

            var network = new ManagedNN
            {
                Wji = Set(model.Wji),
                Wkj = Set(model.Wkj)
            };

            return(network);
        }