예제 #1
0
        /// <summary>形状変更</summary>
        public static Tensor Reshape(Tensor x, Shape shape)
        {
            Function function = new Functions.ArrayManipulation.Reshape(shape);

            Tensor y = new Tensor(shape);

            function.Execute(new Tensor[] { x }, new Tensor[] { y });

            return(y);
        }
예제 #2
0
        /// <summary>形状変更</summary>
        public static VariableNode Reshape(VariableNode x, Shape shape)
        {
            Function function = new Functions.ArrayManipulation.Reshape(shape);

            return(Apply(function, x)[0]);
        }