| 58 | Parameter p_obias; |
| 59 | |
| 60 | DocumentModel(ParameterCollection & m) : |
| 61 | p_w(m.add_lookup_parameters(VOCAB_SIZE, { INPUT_DIM })), |
| 62 | fwd_sent_builder(N_LAYERS, INPUT_DIM, SENTENCE_DIM, m), |
| 63 | bwd_sent_builder(N_LAYERS, INPUT_DIM, SENTENCE_DIM, m), |
| 64 | fwd_doc_builder(N_LAYERS, SENTENCE_DIM * 2, DOCUMENT_DIM, m), |
| 65 | bwd_doc_builder(N_LAYERS, SENTENCE_DIM * 2, DOCUMENT_DIM, m), |
| 66 | p_d2h(m.add_parameters({ HIDDEN_DIM , DOCUMENT_DIM * 2 })), |
| 67 | p_hbias(m.add_parameters({ HIDDEN_DIM })), |
| 68 | p_h2o(m.add_parameters({ LABEL_SIZE, HIDDEN_DIM })), |
| 69 | p_obias(m.add_parameters({ LABEL_SIZE })) { |
| 70 | } |
| 71 | |
| 72 | Expression classify(ComputationGraph & cg, Instance & inst) { |
| 73 | unsigned n_sents = inst.first.size(); |
nothing calls this directly
no test coverage detected