galeone / dynamic-training-bench

Simplify the training and tuning of Tensorflow models
Mozilla Public License 2.0
213 stars 31 forks source link

Syntax Error on Python 3.4 for merging dict into another using ** #19

Closed vivekk0903 closed 6 years ago

vivekk0903 commented 6 years ago

Trying to run the example present here, but this line:

https://github.com/galeone/dynamic-training-bench/blob/master/dytb/train.py#L202

throws a syntax error in python 3.4. On checking the reason, I got to know that this syntax is supported only from 3.5 python.

This was confusing because in the description its written that dytb is compatible with Python 3.4

Please correct the code.

galeone commented 6 years ago

I'd correct the README instead. The unpack generalization I use has been introduced in Python 3.5 and not in python 3.4: https://docs.python.org/3/whatsnew/3.5.html#whatsnew-pep-448

Thank you for pointing this out!

To run the example, just use python 3.5 (it's easy to create a virtualenv with any python version you need, hence go with 3.5 or better 3.6)