/// <summary>2項演算</summary> internal static Tensor BinaryRightConstantArithmetric(Tensor x, Operators.BinaryArithmetric.BinaryRightConstantArithmetric binary_operator) { Function function = new Functions.BinaryRightConstantArithmetric.BinaryRightConstantArithmetric(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); }
/// <summary>コンストラクタ</summary> public BinaryRightConstantArithmetric(Operators.BinaryArithmetric.BinaryRightConstantArithmetric binary_operator) : base(inputs: 1, outputs: 1, allow_resubstitution: true) { this.binary_operator = binary_operator; }
/// <summary>2項演算</summary> internal static VariableNode BinaryRightConstantArithmetric(VariableNode x, Operators.BinaryArithmetric.BinaryRightConstantArithmetric binary_operator) { Function function = new Functions.BinaryRightConstantArithmetric.BinaryRightConstantArithmetric(binary_operator); return(Apply(function, x)[0]); }