BVLC / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
34.12k stars 18.68k forks source link

BVLC/caffe "windows environment python 3.5 plot_training_log.py" #6169

Open briansune opened 6 years ago

briansune commented 6 years ago

Issue summary BVLC/caffe python is developed under python 2.7 environment and the python script have lots of issues: By running "python plot_training_log.py" or other python scripts errors or python syntax problems are shown.

*Steps to reproduce** Just simply run the the plot_training_log script there are at least different forms of errors: @ line 141 & atfer "print xxxx %xxxx" syntax must modify into "print(xxxx %xxx)"

@line 45 & after for i in xrange(num_fields): syntax must modify into for i in range(num_fields):

There are more syntax incompatibilities issues in other script. Please add two version of python script folders / file and labeled as _35 & _27.

System configuration Operating system: Windows 7 x64 Python 3.5 @ Anaconda3

Noiredd commented 6 years ago

Good idea for a PR! resize_and_crop_images.py and summarize.py have problems with print expressions as well. There are some inconsistencies in parse_log.py, which has both print xxx and print(xxx) syntax. I did not check for other issues as I'm not very familiar with Python 3.5 myself.

Would you be able to fix bugs and provide 3.5-compatible versions of the scripts? I would gladly accept such PR.
I would recommend leaving existing (2.7-compatible) scripts intact - people might load them in their own programs, so renaming or significantly modifying them might break their setups.

briansune commented 6 years ago

@Noiredd May i ask what are the steps for the PR <- Should i directly modify the code or other methods?