public void Dense() { var cns = new ConvNetSharp <double>(); var x = cns.Const(1.0, "x"); var op = new Dense <double>(cns, x, 16); var xml = op.ToXml(); var deserialized = SerializationExtensions.FromXml <double>(xml) as Dense <double>; Assert.IsNotNull(deserialized); Assert.AreEqual(2, deserialized.Parents.Count); // input and filters Assert.AreEqual("x", (deserialized.Parents[0] as Const <double>).Name); Assert.AreEqual(1, deserialized.Width); Assert.AreEqual(1, deserialized.Height); Assert.AreEqual(16, deserialized.FilterCount); Assert.AreEqual(1, deserialized.Stride); Assert.AreEqual(0, deserialized.Pad); }