"docs/vscode:/vscode.git/clone" did not exist on "d022177ac9ae0fa14845de38d4babf8a8cbdbd43"
Commit c716c1b8 authored by Evan Lezar's avatar Evan Lezar Committed by Martin Wicke
Browse files

Import scipy.ndimage before tensorflow to fix jpeg load. (#165)

When importing tensorflow before scipi.ndimage and running the
example in a docker container, the following error is given:

```
 % python example.py
Traceback (most recent call last):
  File "example.py", line 25, in <module>
    im = im / 255.
TypeError: unsupported operand type(s) for /: 'instance' and 'float'
```
This only happens for 'cat.jpg'. When converting the image to a '.png'
file, the example runs as expected.

When swapping the imports around so that scipy.ndimage is imported
BEFORE tensorflow, both 'jpg' and 'png' files work.
parent e6b6fb33
......@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
from scipy import ndimage
import tensorflow as tf
from spatial_transformer import transformer
from scipy import ndimage
import numpy as np
import matplotlib.pyplot as plt
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment