예제 #1
0
        /// <summary>トリミング</summary>
        public static VariableNode Trimming2D(VariableNode x, int trim)
        {
            Function function =
                new Functions.Connection2D.Trimming(trim);

            VariableNode y = Apply(function, x)[0];

            return(y);
        }
예제 #2
0
        /// <summary>トリミング</summary>
        public static VariableNode Trimming2D(VariableNode x, int trim_left, int trim_right, int trim_top, int trim_bottom)
        {
            Function function =
                new Functions.Connection2D.Trimming(trim_left, trim_right, trim_top, trim_bottom);

            VariableNode y = Apply(function, x)[0];

            return(y);
        }
예제 #3
0
        /// <summary>トリミング</summary>
        public static Tensor Trimming2D(Tensor x, int trim_left, int trim_right, int trim_top, int trim_bottom)
        {
            Function function =
                new Functions.Connection2D.Trimming(trim_left, trim_right, trim_top, trim_bottom);

            Tensor y = new Tensor(function.OutputShapes(x.Shape)[0]);

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

            return(y);
        }