balancap / SSD-Tensorflow

Single Shot MultiBox Detector in TensorFlow
4.11k stars 1.89k forks source link

invalid syntax error in tf_util.py #28

Open gaopeng-eugene opened 7 years ago

gaopeng-eugene commented 7 years ago

Traceback (most recent call last): File "train_ssd_network.py", line 23, in import tf_utils File "/opt/data/penggao/deep_detection/SSD-Tensorflow/tf_utils.py", line 65 print('\n# =========================================================================== #', file=stream) ^ SyntaxError: invalid syntax

miraclebiu commented 7 years ago

from future module import print_function

balancap commented 7 years ago

@miraclebiu Thanks! I'll try to make the project Python 2 compatible to avoid this kind of bugs.

cooliscool commented 7 years ago

This helped. https://stackoverflow.com/questions/32032697/how-to-use-from-future-import-print-function

Dear python 2 users, you have to add from __future__ import print_function as your first line in code.