static Eltwise SetupEltwise(EltwiseParameter param, string name, string[] inputNames, string[] outputNames) { if (param != null) { return(new Eltwise(param.Operation, param.Coeffs, name, inputNames, outputNames)); } else { return(new Eltwise(EltwiseParameter.EltwiseOp.Sum, null, name, inputNames, outputNames)); } }
static Eltwise <T> SetupEltwise <T>(EltwiseParameter param, string name, string[] inputNames, string[] outputNames) where T : unmanaged, IComparable <T> { if (param != null) { return(new Eltwise <T>(param.Operation, param.Coeffs, name, inputNames, outputNames)); } else { return(new Eltwise <T>(EltwiseParameter.EltwiseOp.Sum, null, name, inputNames, outputNames)); } }