caffe
caffe copied to clipboard
Python3 examples/ssd/ssd_pascal.py
Issue summary
I made all systems work. Import caffe is working now. But when i execute ssd_pascal.py it makes error about xrange. I think it occurs because code is made with PYTHON2. i fixed it to 'range' function but now from model_libs.py file makes errors. Are there any python3 example?
Your system configuration
Operating system: Ubuntu 16.04 Compiler: CUDA version (if applicable): CUDNN version (if applicable): BLAS: Python or MATLAB version (for pycaffe and matcaffe respectively): Python 3.5.2
Do you fix the problem now? I have the same question as you.
Do you fix the problem now? I have the same question as you.
Because it has been long age, I don't remember exactly. But I suppose I changed every Python2 syntax (ex. xrange, xlist) to Python3 syntax. Or you can use Python2 with future module
I have the same problem with this files wrritten in python2: ssd_pascal.py model_libs.py net_spec.py
and if i use python2 the command make pycaffe doesnt work, i'm trying to change the py script to python3.
Did someone succeed in changing the scripts to python3? I really need it and will start to try now.
Did someone succeed in changing the scripts to python3? I really need it and will start to try now.
There is a module that named as 2to3. It makes python2 file into python3 file. Let me know if it works.
Hello @Lee-daeho
I converted ssd_pascal.py and model_libs.py scripts to python3 language.. but still when I run ssd_pascal.py command I get this error:
Traceback (most recent call last):
File "examples/ssd/ssd_pascal_p3.py", line 438, in
Can someone manage to give me some help?