mattgolub / fixed-point-finder

FixedPointFinder: A Tensorflow toolbox for identifying and characterizing fixed points in recurrent neural networks
Apache License 2.0
90 stars 31 forks source link

Python 3 compatibility #2

Closed malmaud closed 3 years ago

malmaud commented 6 years ago

Looks like this project isn't Python 3 compatible (For example, Python 3 doesn't have the cPickle module. It's now just pickle):

malmaud@malux:~/dropbox/golub/fixed-point-finder/example$ python run_FlipFlop.py
/home/malmaud/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Traceback (most recent call last):
  File "run_FlipFlop.py", line 16, in <module>
    from FlipFlop import FlipFlop
  File "/home/malmaud/Dropbox (MIT)/golub/fixed-point-finder/example/FlipFlop.py", line 16, in <module>
    from RecurrentWhisperer import RecurrentWhisperer
  File "/home/malmaud/dropbox/golub/recurrent-whisperer/RecurrentWhisperer.py", line 25, in <module>
    from AdaptiveLearningRate import AdaptiveLearningRate
  File "/home/malmaud/dropbox/golub/recurrent-whisperer/AdaptiveLearningRate.py", line 12, in <module>
    import cPickle
ModuleNotFoundError: No module named 'cPickle'

If you're interested in getting compatibility, the 2to3 tool should make it pretty easy.

mattgolub commented 3 years ago

The codebase is now officially compatible with Python3.