public static ReluLayer Relu(this ConvLayer layer) { var relu = new ReluLayer(); layer.ConnectTo(relu); layer.BiasPref = 0.1; layer.UpdateOutputSize(); return(relu); }
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); }
public static ConvLayer Stride(this ConvLayer layer, int stride) { layer.Stride = stride; layer.UpdateOutputSize(); return(layer); }
public static ConvLayer Pad(this ConvLayer layer, int pad) { layer.Pad = pad; layer.UpdateOutputSize(); return(layer); }
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); }
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); }