Example #1
0
        /// <summary>3次元ベクトルX成分</summary>
        public static Tensor TrivectorX(Tensor x)
        {
            Function function = new Functions.Trivector.TrivectorX();

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

            Tensor y = new Tensor(y_shape);

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

            return(y);
        }
Example #2
0
        /// <summary>3次元ベクトルX成分</summary>
        public static VariableNode TrivectorX(VariableNode x)
        {
            Function function = new Functions.Trivector.TrivectorX();

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