We follow the github repo chainer, and there is a pytorch version.
But finally we used the https://github.com/hzsydy/neural_renderer because it allows image width and height to be different.
go to the directory neural_renderer
and install by
python setup.py develop
python ./neural_renderer/examples/example4_kaggle.py