Ejemplo n.º 1
0
        public FFNNetDTO ExportDTO()
        {
            FFNNetDTO dto = new FFNNetDTO
            {
                Precission = precission,
                Layers     = layers.Select(x => x.ExportDTO()).ToArray(),
            };

            return(dto);
        }
Ejemplo n.º 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);
        }