示例#1
0
        public FFNNet Clone()
        {
            FFNNet net = new FFNNet()
            {
                allocator = allocator
            };

            net.layers = new FFNNetLayer[layers.Length];
            for (int i = 0; i < layers.Length; i++)
            {
                layers[i] = layers[i].Clone();
            }
            return(net);
        }
示例#2
0
        public static FFNNet FromDTO(FFNNetDTO dto, IBufferAllocator allocator)
        {
            FFNNet net = new FFNNet();

            net.allocator  = allocator;
            net.precission = dto.Precission;
            net.layers     = new FFNNetLayer[dto.Layers.Length];

            for (int i = 0; i < net.layers.Length; i++)
            {
                net.layers[i] = FFNNetLayer.FromDTO(dto.Layers[i], allocator, net.precission);
            }
            return(net);
        }