mshunshin / SegNetCMR

A Tensorflow implementation of SegNet for cardiac MRI segmentation
MIT License
74 stars 35 forks source link

SyntaxError: invalid syntax print(f"Reached MAX_STEP: {MAX_STEP} at step: {global_step_value}") #5

Open idhamari opened 6 years ago

idhamari commented 6 years ago

I got many errors related to the print statement. File "train.py", line 82 print(f"Reached MAX_STEP: {MAX_STEP} at step: {global_step_value}") ^ SyntaxError: invalid syntax

mshunshin commented 6 years ago

Check you are using Python >=3.6 It is using f-strings.

On 15 March 2018 at 10:29, idhamari notifications@github.com wrote:

I got many errors related to the print statement. File "train.py", line 82 print(f"Reached MAX_STEP: {MAX_STEP} at step: {global_step_value}") ^ SyntaxError: invalid syntax

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mshunshin/SegNetCMR/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/ABaQNnywDLWcvWoHoJZPx8X_3BgIVs35ks5tekJ9gaJpZM4Sr5Tc .

idhamari commented 6 years ago

Thanks for concern and quick reply. I am using python 2.7 (I built all other tools using it). Is there a way to make it works in python 2.7? or shall I rebuild all other tools in python 3? do you think there will be no conflict?

mshunshin commented 6 years ago

I think it’s only a few of the print statements I use for python 3.6 features - but can’t promise.

Change them from

print(f”This is the result: {result}, and another result: {result2}”) to print(“This is the result: {0}, and another result: {1}”.format(result, result2))

etc…

Have you tried using the anaconda python distribution - I find it works very well on windows and Mac for tensor flow and scientific use. No compiling needed, and has recent versions of tensor flow.

On 16 Mar 2018, at 23:21, idhamari notifications@github.com wrote:

Thanks for concern and quick reply. I am using python 2.7 (I built all other tools using it). Is there a way to make it works in python 2.7? or shall I rebuild all other tools in python 3? do you think there will be no conflict?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

idhamari commented 6 years ago

Thanks for explaining, I will try your suggestion. I am using pip and Ubuntu 16 system.