aria42 / flare

Dynamic Tensor Graph library in Clojure (think PyTorch, DynNet, etc.)
Eclipse Public License 1.0
284 stars 18 forks source link

Scripts to run logistic regression and sentence classification examples #5

Closed kedarbellare closed 6 years ago

kedarbellare commented 6 years ago

Summary

Testing

aria42 commented 6 years ago

Hey @kedarbellare, thanks for the PR. I've uploaded the train data and test data used for the blog post and here's the CLI output for train/test on a jar built from master head (3e5baa17153b), I can recreate the numbers same as the blog post (note the reported numbers are averages) after a few iterations. I think there are a few differences here:

I'm happy to take this PR with a few changes

kedarbellare commented 6 years ago

hey @aria42, i could reproduce the results using the train/test files you provided and the glove 6B 300d vectors (https://gist.github.com/kedarbellare/764b16e813d5e643a1b14c52f53d08ee). i can modify the tokenization scheme and remove filter-glove. however, there seems to be some discrepancy in the original data and your train/test files. the acl data seems to have much longer texts compared to your data. i also tried:

$ grep combination data/sentiment-train10k.txt | grep fiennes
1 interacting eyeball-to-eyeball and toe-to-toe , hopkins and norton are a winning combination -- but fiennes steals 'red dragon' right from under their noses .
$ grep -R -i combination data/aclImdb/train/pos/ | grep -i fiennes
$

i'm not sure what i'm doing wrong :/

regarding topographic sort, the main issue is that a StackOverflowError is thrown for deep DAGs (e.g. LSTMs with sentences containing many tokens) due to the recursive call. let me add a test that captures this.

aria42 commented 6 years ago

Ok, not sure why the sentences are shorter in my sample; it's possible I intentionally selected below a length for some reason. It only matters for reproducing the numbers in the blog post, so I'm fine with accepting this as is. Thanks!