keras-rcnn icon indicating copy to clipboard operation
keras-rcnn copied to clipboard

Import syntax error with losses/_rpn.py

Open jrosebr1 opened this issue 6 years ago • 5 comments

I was playing around with keras-rcnn using Ubuntu and Python 3.4. From my Python shell:

$ python
Python 3.4.3 (default, Nov 17 2016, 01:08:31) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from keras_rcnn.models import RCNN
Using TensorFlow backend.
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/adrian/keras-rcnn/keras_rcnn/models/__init__.py", line 1, in 
    from ._rcnn import RCNN
  File "/home/adrian/keras-rcnn/keras_rcnn/models/_rcnn.py", line 10, in 
    import keras_rcnn.layers
  File "/home/adrian/keras-rcnn/keras_rcnn/layers/__init__.py", line 1, in 
    from .losses import (
  File "/home/adrian/keras-rcnn/keras_rcnn/layers/losses/__init__.py", line 7, in 
    from ._rpn import (
  File "/home/adrian/keras-rcnn/keras_rcnn/layers/losses/_rpn.py", line 86
    return {**super(RPN, self).get_config(), **configuration}
             ^
SyntaxError: invalid syntax

Since this is a syntax error perhaps I suppose I should be testing with a different version of Python?

jrosebr1 avatar Dec 15 '17 15:12 jrosebr1

Hmm not sure if 3.4 works. We use 3.6

jhung0 avatar Jan 16 '18 19:01 jhung0

Thanks, I will give that a try.

jrosebr1 avatar Jan 16 '18 20:01 jrosebr1

@jhung0 3.5.3 works fine.

milani avatar Jan 26 '18 18:01 milani

I got the same error, my system is ubuntu14.04 and python 2.7.6

chituma110 avatar Jan 30 '18 10:01 chituma110

@chituma110 With new commits, It needs at least python 3.6 to run.

milani avatar Jan 30 '18 12:01 milani