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

Mandlebrot example fails on docker image #1427

Closed
tmsimont opened this issue Mar 8, 2016 · 3 comments
Closed

Mandlebrot example fails on docker image #1427

tmsimont opened this issue Mar 8, 2016 · 3 comments
Assignees

Comments

@tmsimont
Copy link

tmsimont commented Mar 8, 2016

I'm running through the Mandlebrot Set tutorial and hit a snag.

I am running tensor flow from Docker -- the b.gcr.io/tensorflow/tensorflow image

When I try to initialize all variables, I get this error:

W tensorflow/core/kernels/cast_op.cc:125] Unimplemented: Cast complex64 to float is not supported
E tensorflow/core/common_runtime/executor.cc:275] Executor failed to create kernel. Unimplemented: Cast complex64 to float is not supported

Full error after copy/pasting tutorial code to python file:

W tensor [[Node: zeros_like/Cast = Cast[DstT=DT_FLOAT, SrcT=DT_COMPLEX64, _device="/job:localhost/replica:0/task:0/cpu:0"](zeros_like/ZerosLike)]]
Traceback (most recent call last):xecutor.cc:275] Executor failed to create kernel.
  File "mb.py", line 36, in <module>oat is not supported
    tf.i [[Node: zeros_like/Cast = Cast[DstT=DT_FLOAT, SrcT=DT_COMPLEX64, _device="/job:localhost/replica:0/task:0/cpu:0"](zeros_like/ZerosLike)]]n/framework/ops.py",
Caused by op u'zeros_like/Cast', defined at:
  File "mb.py", line 34, in <module> feed_dict, self.graph, session)
    ns = tf.Variable(tf.zeros_like(xs, tf.float32))orflow/python/framework/ops.py",
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 632, in zeros_liken, feed_dict)
    ret = gen_math_ops.cast(ret, dtype)ackages/tensorflow/python/client/session.py"
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_math_ops.py", line 193, in castNone, fetches, feed_dict)
    return _op_def_lib.apply_op("Cast", x=x, DstT=DstT, name=name)lient/session.py"
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/op_def_library.py", line 655, in apply_op
    op_def=op_def)/lib/python2.7/dist-packages/tensorflow/python/client/session.py"
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2040, in create_op
    original_op=self._default_original_op, op_def=op_def)/python/client/session.py"
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1087, in __init__
    self._traceback = _extract_stack()mplementedError: Cast complex64 to float is n
ot supported

Is the docker image out of date?

@caisq
Copy link
Contributor

caisq commented Mar 8, 2016

This is caused by changes in the behavior of zeros_like (See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/array_ops.py#L641).

As a temporary workaround, please replace
ns = tf.Variable(tf.zeros_like(xs, tf.float32))
with
ns = tf.Variable(tf.zeros(Z.shape))

We will provide a more permanent solution to this soon.

@tmsimont
Copy link
Author

tmsimont commented Mar 8, 2016

That did the trick! Thanks.

@girving girving self-assigned this Mar 8, 2016
@girving
Copy link
Contributor

girving commented Mar 8, 2016

Fix in review.

@vrv vrv closed this as completed in febfec7 Mar 9, 2016
tarasglek pushed a commit to tarasglek/tensorflow that referenced this issue Jun 20, 2017
stack outputs instead of concat outputs
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

3 participants