Rrottmann/anguita: Fast Approximation Of Tanh With Good ... - GitHub

Skip to content Dismiss alert {{ message }} / anguita Public
  • Notifications You must be signed in to change notification settings
  • Fork 1
  • Star 1

Fast approximation of tanh with good enough results.

License

MIT license 1 star 1 fork Branches Tags Activity Star Notifications You must be signed in to change notification settings
  • Code
  • Issues
  • Pull requests
  • Actions
  • Projects
  • Security
  • Insights
Additional navigation options rrottmann/anguita  masterBranchesTagsGo to fileCode

Folders and files

NameNameLast commit messageLast commit date

Latest commit

 

History

3 Commits
anguitaanguita  
.gitignore.gitignore  
LICENSELICENSE  
README.mdREADME.md  
setup.pysetup.py  
View all files

Repository files navigation

  • README
  • MIT license
Efficient tanh approximation

Efficient tanh algorithm using an approximation of the Hyperbolic function:

Speed Improvement of the Back-Propagation on Current Generation Workstations" D. Anguita, G. Parodi and R. Zunino. Proceedings of the World Congress on Neural Networking, 1993.

Error of the approximation

The approximation of tanh is not precise, but much faster:

x math.tanh anguita.tanh delta
-0.9 -0.716297870199 -0.689095742562 -0.0272021276373
-0.8 -0.664036770268 -0.633359378142 -0.0306773921261
-0.7 -0.604367777117 -0.572415613722 -0.0319521633955
-0.6 -0.537049566998 -0.506264449302 -0.0307851176963
-0.5 -0.46211715726 -0.434905884882 -0.0272112723783
-0.4 -0.379948962255 -0.358339920462 -0.0216090417935
-0.3 -0.291312612452 -0.276566556042 -0.0147460564099
-0.2 -0.197375320225 -0.189585791622 -0.0077895286032
-0.1 -0.099667994625 -0.0973976272017 -0.00227036742325
0.1 0.099667994625 0.0973976272017 0.00227036742325
0.2 0.197375320225 0.189585791622 0.0077895286032
0.3 0.291312612452 0.276566556042 0.0147460564099
0.4 0.379948962255 0.358339920462 0.0216090417935
0.5 0.46211715726 0.434905884882 0.0272112723783
0.6 0.537049566998 0.506264449302 0.0307851176963
0.7 0.604367777117 0.572415613722 0.0319521633955
0.8 0.664036770268 0.633359378142 0.0306773921261
0.9 0.716297870199 0.689095742562 0.0272021276373

About

Fast approximation of tanh with good enough results.

Resources

Readme

License

MIT license Activity

Stars

1 star

Watchers

2 watching

Forks

1 fork Report repository

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
You can’t perform that action at this time.

Từ khóa » Fast Tanh X