Пример #1
0
        /// <summary>四元数2項演算</summary>
        internal static Tensor QuaternionBinaryArithmetric(Tensor x1, Tensor x2, Operators.QuaternionBinaryArithmetric.QuaternionBinaryArithmetric arithmetric)
        {
            Function function = new Functions.QuaternionArithmetric.QuaternionBinaryArithmetric(arithmetric);

            Shape y_shape = function.OutputShapes(x1.Shape, x2.Shape)[0];

            Tensor y = new Tensor(y_shape);

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

            return(y);
        }
Пример #2
0
        /// <summary>四元数2項演算</summary>
        internal static VariableNode QuaternionBinaryArithmetric(VariableNode x1, VariableNode x2, Operators.QuaternionBinaryArithmetric.QuaternionBinaryArithmetric arithmetric)
        {
            Function function = new Functions.QuaternionArithmetric.QuaternionBinaryArithmetric(arithmetric);

            return(Apply(function, x1, x2)[0]);
        }