Update recurrent network base class to build its own activation function.
Update codebase to run in Python 2 as well as Python 3. (Though the HF trainer does not work in Python 3 yet.)