Distributed Tensorflow

102 views
Skip to first unread message

Salem Alqahtani

unread,
Feb 27, 2017, 10:16:51 PM2/27/17
to Discuss
Hi,

I am getting this error. Any hints.
Here is my code.


W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.

W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.

W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.

I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:200] Initialize GrpcChannelCache for job ps -> {0 -> ps0.127.0.0.1:2222, 1 -> ps1.127.0.0.1:2223}

I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:200] Initialize GrpcChannelCache for job worker -> {0 -> localhost:2224, 1 -> worker1.127.0.0.1:2225, 2 -> worker2.127.0.0.1:2226}

I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:221] Started server with target: grpc://localhost:2224

Traceback (most recent call last):

  File "multiLR.py", line 117, in <module>

    tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)

  File "//anaconda/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 44, in run

    _sys.exit(main(_sys.argv[:1] + flags_passthrough))

  File "multiLR.py", line 48, in main

    weights_1  = tf.Variable(tf.zeros[784,100])

TypeError: 'function' object is not subscriptable

sss:code salemalqahtani$ 

Derek Murray

unread,
Feb 27, 2017, 10:19:49 PM2/27/17
to Salem Alqahtani, Discuss
Yep, on line 48 of multLR.py you should have:

  weights_1 = tf.Variable(tf.zeros([784, 100]))

...instead of:

  weights_1 = tf.Variable(tf.zeros[784, 100])

Derek.

PS. Questions like this are better asked on Stack Overflow!

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/7d821cf2-012d-48dc-aa81-2f06abe561e8%40tensorflow.org.

Reply all
Reply to author
Forward
0 new messages