/// <summary>3次元ベクトル1次元逆畳み込み</summary> public static VariableNode TrivectorDeconvolution1D(VariableNode x, VariableNode w, int stride, bool gradmode = false, Shape outshape = null) { if (outshape == null) { int outwidth = (x.Shape.Width - 1) * stride + w.Shape.Width; outshape = Shape.Map1D(w.Shape.InChannels / 4 * 3, outwidth, x.Shape.Batch); } Function function = new Functions.TrivectorConvolution.TrivectorDeconvolution1D(outshape, w.Shape, stride, gradmode); VariableNode y = Apply(function, x, w)[0]; return(y); }
/// <summary>3次元ベクトル1次元逆畳み込み</summary> public static Tensor TrivectorDeconvolution1D(Tensor x, Tensor w, int stride, bool gradmode = false, Shape outshape = null) { if (outshape == null) { int outwidth = (x.Shape.Width - 1) * stride + w.Shape.Width; outshape = Shape.Map1D(w.Shape.InChannels / 4 * 3, outwidth, x.Shape.Batch); } Functions.TrivectorConvolution.TrivectorDeconvolution1D function = new Functions.TrivectorConvolution.TrivectorDeconvolution1D(outshape, w.Shape, stride, gradmode); Tensor y = new Tensor(function.OutShape); function.Execute(new Tensor[] { x, w }, new Tensor[] { y }); return(y); }