unicode-org / lstm_word_segmentation

Python code for training an LSTM model for word segmentation in Thai, Burmese, and similar languages.
Other
20 stars 9 forks source link

Fix sigmoid function, and add more robust tests #32

Open arulkolla opened 7 months ago

arulkolla commented 7 months ago

The sigmoid function tests are buggy as of now (namely, it is tested on a staggered array, which doesn't run for me). Also, the sigmoid function is written a little messily, so and think it can be improved (namely because you can broadcast the function np.exp.)

CLAassistant commented 7 months ago

CLA assistant check
All committers have signed the CLA.

arulkolla commented 7 months ago

The new version of sigmoid makes the tests run twice as fast (for me): 27ms for the old version, 13ms for the new version.