nyu-mll / spinn

NYU ML² work on sentence encoding with tree structure and dynamic graphs
MIT License
108 stars 38 forks source link

Run model on arbitrary sentence #98

Closed descartesholland closed 5 years ago

descartesholland commented 5 years ago

Sorry for the seemingly amateur question here. The code runs (with some minor modifications initially) to produce models, but I don't see where classifications are outputted/logged, if anywhere. How do I obtain classifications for cases in the test set, for example?

descartesholland commented 5 years ago

Is this as simple as examining the "pred" tensor output? 0 : entails, 1 : neutral, 2 : contradiction ?

sleepinyourhat commented 5 years ago

Hrm—I haven't touched this code myself in a while (others might chime in), but building a custom test set file and looking at preds should work. Also look into the write_eval_report flag, defined here: https://github.com/nyu-mll/spinn/blob/master/python/spinn/models/base.py#L586