public static ReluLayer<T> Relu<T>(this LayerBase<T> layer) where T : struct, IEquatable<T>, IFormattable { var relu = new ReluLayer<T>(); relu.AcceptParent(layer); return relu; }
public static ReluLayer<T> Relu<T>(this ConvLayer<T> layer) where T : struct, IEquatable<T>, IFormattable { var relu = new ReluLayer<T>(); relu.AcceptParent(layer); layer.BiasPref = (T)Convert.ChangeType(0.1, typeof(T)); // can we do better? return relu; }