Skip to content
No description, website, or topics provided.
Python C++ Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts Added tagging experiment Sep 21, 2019


The reference codebase for the paper "Graph Structured Prediction Energy Networks," appeaing in NeurIPS 2019.


This code was developed/run using the following versions of the following libraries; in some cases, newer versions may be acceptable. The primary exception is PyTorch - some of the syntax used here changed in newer versions.

  • PyTorch 0.4.1
  • torchvision 0.2.0
  • numpy 1.15.4
  • scikit-image 0.13.1
  • tensorflow 1.12.0 (This is for training visualization purposes)
  • liac-arff (for reading bibtex)
  • torchfile 0.1.0 (for reading bookmarks data files)

Additionally, this code contains a module written in C++; thus, a C++ compiler needs to be installed as well. To make use of LP/ILP inference, you will need a valid Gurobi installation; make sure the GUROBI_HOME environment variable is set to the root dir of this installation.


Make sure to install the library using pip before running (this compiles the C++ code) by running the following command from the root directory:

pip install ./

If you plan on making your own changes, make sure to include the -e flag. Run all scripts from the root directory.


The (compressed) synthetic words datasets are included in the data/ directory. The bibtex/bookmarks datasets can be downloaded here. The script data/ converts the raw data files into the form used by the training code; see scripts/ to see how to run this script. The bookmarks experiment script uses the data files provided by following the instructions listed here. Tagging data can be found here.

You can’t perform that action at this time.