reflection.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:cxflow-tensorflow 作者: Cognexa 项目源码 文件源码
def create_activation(activation_name: str) -> Callable[[tf.Tensor], tf.Tensor]:
    """
    Create TensorFlow activation function with the given name.

    List of available activation functions is available in
    `TensorFlow docs <https://www.tensorflow.org/versions/r0.12/api_docs/python/nn/activation_functions_>`_.

    :param activation_name: activation function name
    :return: callable activation function
    """
    if activation_name == 'identity':
        return tf.identity
    return get_attribute(TF_ACTIVATIONS_MODULE, activation_name)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号