public void Filler_Xavier() { var blob = new Tensor(2, 3, 4, 5); var filler = new XavierFiller(); filler.Fill(blob); int fanIn = blob.Count / blob.Num; double scale = Math.Sqrt(3 / fanIn); using (var blobCpu = blob.OnCpu()) { int count = blob.Count; var data = blobCpu.Data; for (int i = 0; i < count; i++) { Assert.True(data[i] >= -scale); Assert.True(data[i] <= scale); } } }