Example #1
0
        /// <summary>四元数第4成分</summary>
        public static Tensor QuaternionK(Tensor x)
        {
            Function function = new Functions.Quaternion.QuaternionK();

            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>四元数第4成分</summary>
        public static VariableNode QuaternionK(VariableNode x)
        {
            Function function = new Functions.Quaternion.QuaternionK();

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