RPNplus
RPNplus copied to clipboard
cant Train the model
i used the following code in the terminal
python train.py 0
And I got the following errors
Traceback (most recent call last):'
File "train.py", line 240, in
`File "/home/farshid/anaconda3/lib/python3.5/contextlib.py", line 59, in enter return next(self.gen)'
File "/home/farshid/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 3045, in device'
device_function = pydev.merge_device(device_name_or_function)'
File "/home/farshid/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/device.py", line 282, in merge_device'
spec = DeviceSpec.from_string(spec or "")'
File "/home/farshid/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/device.py", line 228, in from_string'
return DeviceSpec().parse_from_string(spec)'
`File "/home/farshid/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/device.py", line 146, in parse_from_string'
splits = [x.split(":") for x in spec.split("/")]'
AttributeError: 'int' object has no attribute 'split'
`
Do you have a GPU or just a CPU? Another thing I noted is you are using python 3.5, while train.py
is ready for python 2, the only issue I think is with print
function, if you use python 3 it must have parenthesis: print('Training Begin')
instead of print 'Training Begin'
.
If you have a CPU and not GPU try changing line 240 from with tf.device(gpuNow):
to:
with tf.device("/cpu:0"):
OK. thanks
I will update you if it works or not
[image: Mailtrack] https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality3& Sender notified by Mailtrack https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality3&
Regards,
On Fri, Apr 20, 2018 at 1:09 PM, Norberto Zurita [email protected] wrote:
Do you have a GPU or just a CPU? Another thing I noted is you are using python 3.5, while train.py is ready for python 2, the only issue I think is with print function, if you use python 3 it must have parenthesis: print('Training Begin') instead of print 'Training Begin'.
If you have a CPU and not GPU try changing line 240 from with tf.device(gpuNow): to:
with tf.device("/cpu:0"):
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/huangshiyu13/RPNplus/issues/16#issuecomment-383002974, or mute the thread https://github.com/notifications/unsubscribe-auth/Ae9uRZhRCpd-PgI6908aUdx2luRTABNOks5tqYnFgaJpZM4Rur6A .