Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow version #3

Open
affromero opened this issue May 18, 2017 · 2 comments
Open

Tensorflow version #3

affromero opened this issue May 18, 2017 · 2 comments

Comments

@affromero
Copy link

affromero commented May 18, 2017

Hello,

What TF version matches with this implementation?
I ask this because I run the MNIST+LeNet tutorial in TF instead of caffe and I got some errors.

It is what I did:

$ pip install https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=gpu-linux/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow_gpu-1.1.0-cp27-none-linux_x86_64.whl
import tensorflow

Ok. Then,

$ pip install -e $DIGITS_ROOT

At this point I'm not able to run without getting an error.

import tensorflow
/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py in <module>()
     22 
     23 # pylint: disable=wildcard-import
---> 24 from tensorflow.python import *
     25 # pylint: enable=wildcard-import
     26 

/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py in <module>()
     50 
     51 # Protocol buffers
---> 52 from tensorflow.core.framework.graph_pb2 import *
     53 from tensorflow.core.framework.node_def_pb2 import *
     54 from tensorflow.core.framework.summary_pb2 import *

/usr/local/lib/python2.7/dist-packages/tensorflow/core/framework/graph_pb2.py in <module>()
     14 
     15 
---> 16 from tensorflow.core.framework import node_def_pb2 as tensorflow_dot_core_dot_framework_dot_node__def__pb2
     17 from tensorflow.core.framework import function_pb2 as tensorflow_dot_core_dot_framework_dot_function__pb2
     18 from tensorflow.core.framework import versions_pb2 as tensorflow_dot_core_dot_framework_dot_versions__pb2

/usr/local/lib/python2.7/dist-packages/tensorflow/core/framework/node_def_pb2.py in <module>()
     14 
     15 
---> 16 from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
     17 
     18 

/usr/local/lib/python2.7/dist-packages/tensorflow/core/framework/attr_value_pb2.py in <module>()
     14 
     15 
---> 16 from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
     17 from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
     18 from tensorflow.core.framework import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2

/usr/local/lib/python2.7/dist-packages/tensorflow/core/framework/tensor_pb2.py in <module>()
     14 
     15 
---> 16 from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
     17 from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
     18 from tensorflow.core.framework import types_pb2 as tensorflow_dot_core_dot_framework_dot_types__pb2

/usr/local/lib/python2.7/dist-packages/tensorflow/core/framework/resource_handle_pb2.py in <module>()
     20   package='tensorflow',
     21   syntax='proto3',
---> 22   serialized_pb=_b('\n/tensorflow/core/framework/resource_handle.proto\x12\ntensorflow\"m\n\x0eResourceHandle\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tB4\n\x18org.tensorflow.frameworkB\x13ResourceHandleProtoP\x01\xf8\x01\x01\x62\x06proto3')
     23 )
     24 _sym_db.RegisterFileDescriptor(DESCRIPTOR)

TypeError: __init__() got an unexpected keyword argument 'syntax'

I suspect that:
Latest TF version needs protobuf 3.3.0
This DIGITS version runs protobuf-2.6.1

Any advice?
I'm running on Ubuntu 16
Thank you!

@gheinrich
Copy link
Owner

Hello, you can check #2 for a working configuration.

@affromero
Copy link
Author

Thank you for your reply.
Ok. It works with MNIST+LeNet in TF.

Nevertheless, Training the model for MNIST+GAN, I get this error:

I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
2017-05-19 11:30:54 [INFO] Train batch size is 16 and validation batch size is 16
2017-05-19 11:30:54 [INFO] Training epochs to be completed for each validation : 1
2017-05-19 11:30:54 [INFO] Training epochs to be completed before taking a snapshot : 1.0
2017-05-19 11:30:54 [INFO] Model weights will be saved as snapshot_<EPOCH>_Model.ckpt
Traceback (most recent call last):
File "/home/afromero/DIGITS-GAN/digits/tools/tensorflow/main.py", line 707, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "/home/afromero/DIGITS-GAN/digits/tools/tensorflow/main.py", line 469, in main
exec(open(path_network).read(), globals())
File "<string>", line 446
SyntaxError: 'return' outside function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants