DreamIP / haddoc2

Caffe to VHDL
https://dream.ispr-ip.fr/
BSD 2-Clause "Simplified" License
66 stars 28 forks source link

TanhLayer.vhdl correct? #7

Open BlazeCode2 opened 5 years ago

BlazeCode2 commented 5 years ago

Is the TanhLayer.vhdl's logic correct?. it just bit slices the SUM_WIDTH long bit array to BITWIDTH wide. it won't even consider the sign bit. Just take the least significant BITWIDTH bits.

KamelAbdelouahab commented 5 years ago

Few commits ago I reformulated the tanh layer hdl. This new implementation TanHLayer is kind of trashy It's supposed to implement a piece-wise approximation of the TanH described here https://hal.archives-ouvertes.fr/hal-01654697/document . If you find time to improve its behavior, please pull request :)