davidBelanger / SPEN

Structured Prediction Energy Networks in Torch
131 stars 19 forks source link

Prediction part code #1

Closed lighnt closed 7 years ago

lighnt commented 7 years ago

Hi, could you please tell me where is the code for solving equation (2) of your paper? I spent a long time studying your code but failed to find it.

davidBelanger commented 7 years ago

eq (2) specifies an optimization problem, but does not describe an algorithm for solving it. The algorithm we use is gradient descent. We instantiate this algorithm as a long neural network that implements gradient descent for a fixed number of iterations. The advantage of implementing the algorithm as a differentiable neural network is that we can perform end-to-end training.

This network, which is api-equivalent to a simple feed-forward classifier, is constructed in main.lua as problem.inferencer.

lighnt commented 7 years ago

Thanks a lot, :)