Hello,
I am trying to follow an online tutorial for using Keras
When experimenting with the following code segment, which are just some "import module" part, I get the following error message. It is related to set_image_dim_ordering. Would you like to share any insight on walking around this? Thanks.
(tfw) bash-4.1$ python train.py
Using TensorFlow backend.
Traceback (most recent call last):
File "train.py", line 16, in <module>
K.set_image_dim_ordering('tf')
AttributeError: 'module' object has no attribute 'set_image_dim_ordering'
# the following is the code
from __future__ import print_function
from PIL import Image
from skimage import io
io.use_plugin('pil')
from skimage import img_as_uint
import numpy as np
from keras.models import Model
from keras.layers import Input, merge, Convolution2D, MaxPooling2D, UpSampling2D
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRateScheduler
from keras import backend as K
from data import load_train_data, load_test_data
K.set_image_dim_ordering('tf')
img_rows = 64
img_cols = 80