gpt4 book ai didi

machine-learning - tensorflow 中的激活函数有区别吗? tf.nn.tanh 与 tf.tanh

转载 作者:行者123 更新时间:2023-11-30 08:38:21 25 4
gpt4 key购买 nike

我想设置一个神经网络,我问自己这两个函数之间是否有区别?

tf.nn.tanh 与 tf.tanh

最佳答案

很容易确认它们是相同的:

In [1]: import tensorflow as tf

In [2]: tf.nn.tanh
Out[2]: <function tensorflow.python.ops.math_ops.tanh>

In [3]: tf.tanh
Out[3]: <function tensorflow.python.ops.math_ops.tanh>

In [4]: tf.nn.tanh == tf.tanh
Out[4]: True

In [5]: tf.__version__
Out[5]: '0.11.0rc1'

关于machine-learning - tensorflow 中的激活函数有区别吗? tf.nn.tanh 与 tf.tanh,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44949292/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com