コード例 #1
0
        public static ReluLayer Relu(this ConvLayer layer)
        {
            var relu = new ReluLayer();

            layer.ConnectTo(relu);

            layer.BiasPref = 0.1;
            layer.UpdateOutputSize();

            return(relu);
        }
コード例 #2
0
        public static ReluLayer <T> Relu <T>(this ConvLayer <T> layer) where T : struct, IEquatable <T>, IFormattable
        {
            var relu = new ReluLayer <T>();

            layer.ConnectTo(relu);

            layer.BiasPref = (T)Convert.ChangeType(0.1, typeof(T));  // can we do better?
            layer.UpdateOutputSize();

            return(relu);
        }
コード例 #3
0
 public static ConvLayer Stride(this ConvLayer layer, int stride)
 {
     layer.Stride = stride;
     layer.UpdateOutputSize();
     return(layer);
 }
コード例 #4
0
 public static ConvLayer Pad(this ConvLayer layer, int pad)
 {
     layer.Pad = pad;
     layer.UpdateOutputSize();
     return(layer);
 }
コード例 #5
0
 public static ConvLayer <T> Stride <T>(this ConvLayer <T> layer, int stride) where T : struct, IEquatable <T>, IFormattable
 {
     layer.Stride = stride;
     layer.UpdateOutputSize();
     return(layer);
 }
コード例 #6
0
 public static ConvLayer <T> Pad <T>(this ConvLayer <T> layer, int pad) where T : struct, IEquatable <T>, IFormattable
 {
     layer.Pad = pad;
     layer.UpdateOutputSize();
     return(layer);
 }