Exemple #1
0
        /// <summary>3次元ベクトル1項演算</summary>
        internal static Tensor TrivectorUnaryArithmetric(Tensor v, Operators.TrivectorUnaryArithmetric.TrivectorUnaryArithmetric arithmetric)
        {
            Function function = new Functions.TrivectorArithmetric.TrivectorUnaryArithmetric(arithmetric);

            Shape x_shape = function.OutputShapes(v.Shape)[0];

            Tensor x = new Tensor(x_shape);

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

            return(x);
        }
Exemple #2
0
        /// <summary>3次元ベクトル1項演算</summary>
        internal static VariableNode TrivectorUnaryArithmetric(VariableNode v, Operators.TrivectorUnaryArithmetric.TrivectorUnaryArithmetric arithmetric)
        {
            Function function = new Functions.TrivectorArithmetric.TrivectorUnaryArithmetric(arithmetric);

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