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

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

            Tensor y = new Tensor(y_shape);

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

            return(y);
        }
Ejemplo n.º 2
0
        /// <summary>2項演算</summary>
        internal static VariableNode BinaryLeftConstantArithmetric(VariableNode x, Operators.BinaryArithmetric.BinaryLeftConstantArithmetric binary_operator)
        {
            Function function = new Functions.BinaryLeftConstantArithmetric.BinaryLeftConstantArithmetric(binary_operator);

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