gpt4 book ai didi

python - CNTK中用户定义的激活函数

转载 作者:太空宇宙 更新时间:2023-11-03 14:56:38 25 4
gpt4 key购买 nike

有没有办法为 CNTK(Python API)中的层提供用户定义的激活函数,而不仅仅是像 tanh、relu 等原始函数?像这样的事情

def f(x):
return x * x
LSTM(number_of_cells, activation=f)

最佳答案

是的,你写的应该按原样工作。

本教程可能对您有用: https://www.cntk.ai/Tutorials/CVPR2017/CVPR_2017_Tutorial_final.pdf

此外,CNTK还有许多教程和手册: https://github.com/Microsoft/CNTK/tree/master/Tutorials https://github.com/Microsoft/CNTK/tree/master/Manual

关于python - CNTK中用户定义的激活函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45513998/

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