Example #1
0
        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;
        }
Example #2
0
        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;
        }