Ejemplo n.º 1
0
        /// <summary>2項演算</summary>
        internal static Tensor BinaryRightVectorArithmetric(Tensor x1, Tensor x2, Operators.BinaryArithmetric.BinaryRightVectorArithmetric binary_operator)
        {
            Function function = new Functions.BinaryRightVectorArithmetric.BinaryRightVectorArithmetric(binary_operator);

            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);
        }
Ejemplo n.º 2
0
        /// <summary>2項演算</summary>
        internal static VariableNode BinaryRightVectorArithmetric(VariableNode x1, VariableNode x2, Operators.BinaryArithmetric.BinaryRightVectorArithmetric binary_operator)
        {
            Function function = new Functions.BinaryRightVectorArithmetric.BinaryRightVectorArithmetric(binary_operator);

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