示例#1
0
        /// <summary>実数から複素数を構成</summary>
        public static Tensor ComplexCast(Tensor real, Tensor imag)
        {
            Function function = new Functions.Complex.ComplexCast();

            Shape y_shape = function.OutputShapes(real.Shape)[0];

            Tensor y = new Tensor(y_shape);

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

            return(y);
        }
示例#2
0
        /// <summary>実数から複素数を構成</summary>
        public static VariableNode ComplexCast(VariableNode real, VariableNode imag)
        {
            Function function = new Functions.Complex.ComplexCast();

            return(Apply(function, real, imag)[0]);
        }