TobyPDE / FRRN

Full Resolution Residual Networks for Semantic Image Segmentation
MIT License
278 stars 93 forks source link

error running "python predict.py" in Python 3.4 #2

Closed amiltonwong closed 7 years ago

amiltonwong commented 7 years ago

Hi, @TobyPDE ,

I installed the prerequisite packaged as listed in readme.md, then I cloned FRRN and then issue command: python predict.py, I got the following error :

(cv_python3) root@milton-OptiPlex-9010:/data/code2/FRRN# python predict.py /root/.virtualenvs/cv_python3/lib/python3.4/site-packages/theano/tensor/signal/downsample.py:6: UserWarning: downsample module has been moved to the theano.tensor.signal.pool module.
  "downsample module has been moved to the theano.tensor.signal.pool module.")
Traceback (most recent call last):
  File "predict.py", line 3, in <module>
    import dltools
  File "/data/code2/FRRN/dltools/__init__.py", line 12, in <module>
    from . import hybrid_training
  File "/data/code2/FRRN/dltools/hybrid_training.py", line 112
    result = grad_fns[i](*args, *prev)
                                ^
SyntaxError: invalid syntax
(cv_python3) root@milton-OptiPlex-9010:/data/code2/FRRN#

Any suggestion to fix it? Thx~

TobyPDE commented 7 years ago

The error is thrown because I use some syntactic constructs that are only available in Python 3.5. I will rewrite these sections and make the code also work in Python 3.4.

TobyPDE commented 7 years ago

The new release works with Python 3.4 and 2.7.