Update to support TF2

Fixes #46