コード例 #1
0
        public static Scalar <Type> Sum <Type>(Tensor <Type> x)
        {
            switch (x)
            {
            case Operators.Tensors.OneHotPoint <Type> hot:
                return(hot.Content);

            default:
                return(new Aggregate <Type>("Sum", x, dx: (_x, _f) => Op.OnesLike(_x)));
            }
        }