MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / hardtan_activate

Function hardtan_activate

yolo_detector/darknet_opt/src/activations.h:25–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 else return (x - n) + floor(x/2.);
24}
25static inline float hardtan_activate(float x)
26{
27 if (x < -1) return -1;
28 if (x > 1) return 1;
29 return x;
30}
31static inline float linear_activate(float x){return x;}
32static inline float logistic_activate(float x){return 1./(1. + exp(-x));}
33static inline float loggy_activate(float x){return 2./(1. + exp(-x)) - 1;}

Callers 1

activateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected