版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010255642/article/details/82114747
acos函数是反余弦函数
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 27 11:16:32 2018
@author: myhaspl
"""
import tensorflow as tf
a = tf.constant([[0.1, -0.2], [-0.3, 0.4]])
result1=tf.acos(a)
sess=tf.Session()
with sess:
print sess.run(result1)
[[1.4706289 1.7721543]
[1.875489 1.1592795]]
acosh反双曲余弦-X中元素的反双曲余弦
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 27 11:16:32 2018
@author: myhaspl
"""
import tensorflow as tf
a = tf.constant([[1., 2.], [3., 4.]])
result1=tf.acosh(a)
sess=tf.Session()
with sess:
print sess.run(result1)
[[0. 1.316958 ]
[1.7627472 2.063437 ]]