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 ]]