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

tf.contrib.image.rotate errors under Windows #9672

Closed
timttate opened this issue May 4, 2017 · 19 comments
Closed

tf.contrib.image.rotate errors under Windows #9672

timttate opened this issue May 4, 2017 · 19 comments
Assignees

Comments

@timttate
Copy link

timttate commented May 4, 2017

Description

Trying to use tf.contrib.image.rotate produces the error: tensorflow.python.framework.errors_impl.NotFoundError: Op type not registered 'ImageProjectiveTransform'. This appears to happen on Windows using both CPU and GPU, and does not appear to happen on Linux (Ubuntu 14.0.4, Tensorflow 1.0.1).

Test Case

import tensorflow as tf
images = tf.zeros([2, 2])
rotated_images = tf.contrib.image.rotate(images, 0)

Traceback

Traceback (most recent call last):
  File "test.py", line 3, in <module>
    rotated_images = tf.contrib.image.rotate(images, 0)
  File "C:\Users\tim\didi-car\tf_env\lib\site-packages\tensorflow\contrib\image\python\ops\image_ops.py", line 72, in rotate
    angles_to_projective_transforms(angles, image_width, image_height))
  File "C:\Users\tim\didi-car\tf_env\lib\site-packages\tensorflow\contrib\image\python\ops\image_ops.py", line 166, in transform
    output = gen_image_ops.image_projective_transform(images, transforms)
  File "C:\Users\tim\didi-car\tf_env\lib\site-packages\tensorflow\contrib\image\ops\gen_image_ops.py", line 49, in image_projective_transform
    transforms=transforms, name=name)
  File "C:\Users\tim\didi-car\tf_env\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 768, in apply_op
    op_def=op_def)
  File "C:\Users\tim\didi-car\tf_env\lib\site-packages\tensorflow\python\framework\ops.py", line 2338, in create_op
    set_shapes_for_outputs(ret)
  File "C:\Users\tim\didi-car\tf_env\lib\site-packages\tensorflow\python\framework\ops.py", line 1719, in set_shapes_for_outputs
    shapes = shape_func(op)
  File "C:\Users\tim\didi-car\tf_env\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 610, in call_cpp_shape_fn
    debug_python_shape_fn, require_shape_fn)
  File "C:\Users\tim\didi-car\tf_env\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 671, in _call_cpp_shape_fn_impl
    input_tensors_as_shapes, status)
  File "c:\users\tim\anaconda3\Lib\contextlib.py", line 66, in __exit__
    next(self.gen)
  File "C:\Users\tim\didi-car\tf_env\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: Op type not registered 'ImageProjectiveTransform'

System information

  • Windows 10 Pro
  • TensorFlow 1.1.0 installed via pip into virtual environment
  • Python 3.5.1 (Anaconda)
@timttate
Copy link
Author

If the PIP package for Windows is built with CMake, it seems like perhaps this is a known limitation of the TensorFlow CMake build?

From the TensorFlow CMake README:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/cmake/README.md

It is not possible to load a custom Op library.

The CMake README also claims that:

The tf.contrib libraries are not currently included in the PIP package.

which doesn't seem to be the case anymore, since I have been using tf.contrib.layers without issue.

@astromme
Copy link
Contributor

astromme commented Jun 8, 2017

I'm getting this as well. Did you solve it?

@ringw
Copy link
Contributor

ringw commented Jun 8, 2017

I'm traveling but will spin up a Windows VM and debug this when I get home in 2 weeks.

@JingyuQian
Copy link

Having the same issue here.

  • Win 10
  • TensorFlow 1.2 installed via pip into a virtual environment.
  • Python 3.5.2 (Anaconda)

The test case is similar.

@roponator
Copy link

Same problem, using non-anaconda python, win10.

@basejn
Copy link

basejn commented Jul 5, 2017

I have the same problem . Instead i am trying to apply transformation matrix via contrib.image.transform but it seems to use the same function 'ImageProjectiveTransform'

  • Win 7
  • TensorFlow 1.2 installed via pip.
  • Python 3.5 (Anaconda)

@fodortibi
Copy link

I have the same problem even with 1.3.0rc0 win7 CPU.
tensorflow-1.3.0rc0-cp35-cp35m-win_amd64.whl
https://pypi.python.org/packages/44/43/bcacb6d0a1b63bb0e000a5301079dc66f4da842923878b371a63645ee188/tensorflow-1.3.0rc1-cp35-cp35m-win_amd64.whl#md5=95b003c917ce4f535fab12a149a953d1

Jupyter notebook:
http://www.anishathalye.com/media/2017/07/25/adversarial.ipynb

NotFoundError: Op type not registered 'ImageProjectiveTransform' in binary running on DHUB2362. Make sure the Op and Kernel are registered in the binary running in this process.

@vinayprabhu
Copy link

Same issue here

  • Windows 10
  • GTX 960M
  • Python 3.5 (Anaconda)
  • tensorflow_gpu-1.2.1-cp35-cp35m-win_amd64.whl
  • tf 1.2.1

@venkatesh-sg
Copy link

Same problem. Did anyone solved it or is there any work around?

@fodortibi
Copy link

Hello, my work around was to switch to Ubuntu Linux. It took about an hour an 10GB HD space to install VirtualBox on my Windows, and Linux and python and tensorflow, and all the other packages and the rotate operation works. Regards. Tibi

@ringw
Copy link
Contributor

ringw commented Oct 8, 2017

Thanks @av8ramit!

@zcz004
Copy link

zcz004 commented Oct 17, 2017

@av8ramit This function can only be used by building tf from source? The error persists.

@av8ramit av8ramit reopened this Oct 17, 2017
@zcz004
Copy link

zcz004 commented Oct 17, 2017

Does pip package include this update?

@av8ramit
Copy link

The nightly pip packages have this update.

@zcz004
Copy link

zcz004 commented Oct 17, 2017

@av8ramit Thank you. It helps.

@zcz004
Copy link

zcz004 commented Oct 17, 2017

Can it be backpropagated? It seems it can't...

@Moondra
Copy link

Moondra commented Oct 19, 2017

Same problem here:

  • Windows 7

  • Tensorflow 1.3

  • Python 3.6

@gunan
Copy link
Contributor

gunan commented Oct 19, 2017

We are working on TF 1.4. I think it will have this fix.
We will not create a patch release for 1.3, because this issue is in contrib.
(That is not saying for all issues in core we will create patch releases.)

@gunan gunan closed this as completed Oct 19, 2017
@zywvvd
Copy link

zywvvd commented Oct 26, 2017

that's true .
the problem is handled well after I installed tensorflow 1.4
before that I used tf 1.3 on Win 10
tf1.4 seems to not be installed by pip current now
I downloaded a copy from the link https://pypi.python.org/pypi/tensorflow

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