예제 #1
0
        public void Filler_Uniform(double min, double max)
        {
            var blob   = new Tensor(2, 3, 4, 5);
            var config = new UniformFillerConfiguration(min, max);
            var filler = new UniformFiller(config);

            filler.Fill(blob);

            using (var blobCpu = blob.OnCpu())
            {
                int count = blob.Count;
                var data  = blobCpu.Data;
                for (int i = 0; i < count; i++)
                {
                    Assert.True(data[i] >= min);
                    Assert.True(data[i] <= max);
                }
            }
        }
 public StocasticPoolingLayerTests()
 {
     var filler = new UniformFiller(0.1f, 1f);
     filler.Fill(bottom);
 }
예제 #3
0
        public InnerProductLayerTests()
        {
            var filler = new UniformFiller();

            filler.Fill(bottom);
        }
        public StocasticPoolingLayerTests()
        {
            var filler = new UniformFiller(0.1f, 1f);

            filler.Fill(bottom);
        }
 public InnerProductLayerTests()
 {
     var filler = new UniformFiller();
     filler.Fill(bottom);
 }
예제 #6
0
        public void Filler_Uniform(double min, double max)
        {
            var blob = new Tensor(2, 3, 4, 5);
            var config = new UniformFillerConfiguration(min, max);
            var filler = new UniformFiller(config);
            filler.Fill(blob);

            using (var blobCpu = blob.OnCpu())
            {
                int count = blob.Count;
                var data = blobCpu.Data;
                for (int i = 0; i < count; i++)
                {
                    Assert.True(data[i] >= min);
                    Assert.True(data[i] <= max);
                }
            }
        }