This code is tested on Ubuntu 20.04, with Python 3.6, PyTorch 1.7.1, and CUDA 11.3.