Custom transfer function much slower than standard transfer functions
古いコメントを表示
Hi,
I needed to define a custom transfer function for a custom neural network I am building, more specifically a negative exponetial transfer function a = exp(n).
I followed the instructions of the documentation and it does work, in principle. The problem is that it is A LOT slower than the standard transfer functions.
I started investigating this and put breakpoints in the code of other transfer funcions (in /usr/local/MATLAB/R2012b/toolbox/nnet/nntransfer). The debugger does not break at these points. It seems like the neural network toolbox is using some compiled versions of the transfer functions.
How can I do the same with my custom transfer function?
The speed at which it is currently working makes it unusable for me.
Thanks for your help, it is very much appreciated! Rico
回答 (1 件)
Greg Heath
2013 年 12 月 19 日
編集済み: Greg Heath
2013 年 12 月 19 日
Just modify the code for radbas.
type radbas
Thank you for formally accepting my answer.
Greg
4 件のコメント
Rico
2013 年 12 月 19 日
Greg Heath
2013 年 12 月 19 日
編集済み: Greg Heath
2013 年 12 月 19 日
Yes. However, it is not clear if you have ever modified a working code instead of writing your own.
Rico
2014 年 1 月 6 日
Andreas Walker
2021 年 2 月 17 日
Sorry for bringing up again such an old thread, but an actual answer would be really helpful.
I have two neural networks doing roughly the same (same input-output structure, solving a regression task). One uses built-in transfer functions and has about 250 layers (network 1). The other one uses some custom transfer functions and has about 60 layers (network 2). I created the custom function by copying the framework around an existing transfer function to the working directory and adapted names & functions.
Network 2 fits the data much, much better. Hence I want to use this network. However, a call to sim(net, ...) takes about 7 (!) times longer on network 2 than on network 1. Why is this the case and how can I make network 2 faster?
カテゴリ
ヘルプ センター および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!