我的CNN中的活动函数的形式如下:
abs(X)< tou f = 1.716tanh(0.667x)
x >= tou f = 1.716[tanh(2tou/3)+tanh'(2tou/3)(x-tou)]
x <= -tou f = 1.716[tanh(-2tou/3)+tanh'(-2tou/3)(x+tou)]
tou
是一个常量。在
所以,在TensorFlow中,有可能产生自己的激活函数。我不想用C++编写它,重新编译整个TysFooSur.在
如何使用TensorFlow中可用的函数来实现它?在
Tags:
在tensorflow中,如果包含已经存在的操作,那么编写自己的激活函数是很容易的,对于您的情况,您可以使用
tf.case
相关问题 更多 >
编程相关推荐