示例#1
0
        /// <summary>チャネルごとの1次元逆畳み込み</summary>
        public static VariableNode ChannelwiseDeconvolution1D(VariableNode x, VariableNode w, int stride, Shape outshape = null)
        {
            if (outshape == null)
            {
                int outwidth = (x.Shape.Width - 1) * stride + w.Shape.Width;

                outshape = Shape.Map1D(w.Shape.InChannels, outwidth, x.Shape.Batch);
            }

            Function function =
                new Functions.Connection1D.ChannelwiseDeconvolution(outshape, w.Shape, stride);

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

            return(y);
        }
示例#2
0
        /// <summary>チャネルごとの1次元逆畳み込み</summary>
        public static Tensor ChannelwiseDeconvolution1D(Tensor x, Tensor w, int stride, Shape outshape = null)
        {
            if (outshape == null)
            {
                int outwidth = (x.Shape.Width - 1) * stride + w.Shape.Width;

                outshape = Shape.Map1D(w.Shape.InChannels, outwidth, x.Shape.Batch);
            }

            Functions.Connection1D.ChannelwiseDeconvolution function =
                new Functions.Connection1D.ChannelwiseDeconvolution(outshape, w.Shape, stride);

            Tensor y = new Tensor(function.OutShape);

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

            return(y);
        }