/// <summary>3次元平均値逆プーリング</summary>
        public static VariableNode AverageUnpooling3D(VariableNode x, int stride, Shape outshape = null)
        {
            if (outshape == null)
            {
                int outwidth  = x.Shape.Width * stride;
                int outheight = x.Shape.Height * stride;
                int outdepth  = x.Shape.Depth * stride;

                outshape = Shape.Map3D(x.Shape.Channels, outwidth, outheight, outdepth, x.Shape.Batch);
            }

            Function function =
                new Functions.Connection3D.AverageUnpooling(outshape, stride);

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

            return(y);
        }
        /// <summary>3次元平均値逆プーリング</summary>
        public static Tensor AverageUnpooling3D(Tensor x, int stride, Shape outshape = null)
        {
            if (outshape == null)
            {
                int outwidth  = x.Shape.Width * stride;
                int outheight = x.Shape.Height * stride;
                int outdepth  = x.Shape.Depth * stride;

                outshape = Shape.Map3D(x.Shape.Channels, outwidth, outheight, outdepth, x.Shape.Batch);
            }

            Function function =
                new Functions.Connection3D.AverageUnpooling(outshape, stride);

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

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

            return(y);
        }