HI,
While running the code
model = VGG16_Avg(include_top=False)
in Neural Transfer notebook i am getting the error as:
ypeError Traceback (most recent call last)
in ()
----> 1 model = VGG16_Avg(include_top=False)
~/nbs/vgg16_avg.py in VGG16_Avg(include_top, weights, input_tensor, input_shape, classes)
36 min_size=48,
37 data_format=K.image_data_format(),
—> 38 include_top=include_top)
39
40 if input_tensor is None:
TypeError: _obtain_input_shape() got an unexpected keyword argument ‘dim_ordering’
As per the suggestion in the post i changed the ‘dim_ordering’ part in the code to ‘data_format’, but am still getting the same error.
input_shape = _obtain_input_shape(input_shape,
default_size=224,
min_size=48,
data_format=K.image_data_format(),
include_top=include_top)
I also changed
load weights
if weights == 'imagenet':
if K.image_dim_ordering() == 'th':
to K.image_data_format() == ‘th’:
but to no avail.
I am using the below commands for installing all the softwares in my p2.xlarge machine:-
- sudo apt update
- sudo apt upgrade
- cd downloads/
- wget https://repo.continuum.io/archive/Anaconda3-4.3.0-Linux-x86_64.sh
- bash Anaconda3-4.3.0-Linux-x86_64.sh -b
- cd
- vim .bashrc
- sudo shutdown -r now
- cd downloads/
- wget http://files.fast.ai/files/cudnn-8.0-linux-x64-v5.1.tgz
- tar -zxf cudnn-8.0-linux-x64-v5.1.tgz
- cd cuda/
- sudo cp lib64/* /usr/local/cuda/lib64/
- sudo cp include/* /usr/local/cuda/include/
- pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.1-cp36-cp36m-linux_x86_64.whl
- conda install bcolz
- conda update --all
- pip install git+git://github.com/fchollet/keras.git
- echo ‘{
“image_dim_ordering”: “tf”,
“epsilon”: 1e-07,
“floatx”: “float32”,
“backend”: “tensorflow”
}’ > ~/.keras/keras.json
Please help!
Thanks,
Naman