コード例 #1
0
        /// <summary>四元数1項演算</summary>
        internal static Tensor QuaternionUnaryArithmetric(Tensor x, Operators.QuaternionUnaryArithmetric.QuaternionUnaryArithmetric arithmetric)
        {
            Function function = new Functions.QuaternionArithmetric.QuaternionUnaryArithmetric(arithmetric);

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

            Tensor y = new Tensor(y_shape);

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

            return(y);
        }
コード例 #2
0
        /// <summary>四元数1項演算</summary>
        internal static VariableNode QuaternionUnaryArithmetric(VariableNode x, Operators.QuaternionUnaryArithmetric.QuaternionUnaryArithmetric arithmetric)
        {
            Function function = new Functions.QuaternionArithmetric.QuaternionUnaryArithmetric(arithmetric);

            return(Apply(function, x)[0]);
        }