I am getting the following error while trying to run the 7 line custom model.
I have installed all the required libraries and configured Theano and Keras properly as well based on the given instruction. I am running this on a local Ubunut 14.04, NVIDIA 759Ti, 16GB, i7 machine.
Please help me with this, as I unable to proceed ahead because of this roadblock.
NotImplementedError Traceback (most recent call last)
in ()
----> 1 vgg = Vgg16()
2 # Grab a few images at a time for training and validation.
3 # NB: They must be in subdirectories named based on their category
4 print(path+‘train’)
5 batches = vgg.get_batches(path+‘train’, batch_size=batch_size)
/home/prsahu/Downloads/courses-master/deeplearning1/nbs/vgg16.pyc in init(self)
30 def init(self):
31 self.FILE_PATH = ‘http://www.platform.ai/models/’
—> 32 self.create()
33 self.get_classes()
34
/home/prsahu/Downloads/courses-master/deeplearning1/nbs/vgg16.pyc in create(self)
65 def create(self):
66 model = self.model = Sequential()
—> 67 model.add(Lambda(vgg_preprocess, input_shape=(3,224,224), output_shape=(3,224,224)))
68
69 self.ConvBlock(2, 64)
/home/prsahu/anaconda2/envs/fastAI/lib/python2.7/site-packages/keras/models.pyc in add(self, layer)
278 else:
279 input_dtype = None
–> 280 layer.create_input_layer(batch_input_shape, input_dtype)
281
282 if len(layer.inbound_nodes) != 1:
/home/prsahu/anaconda2/envs/fastAI/lib/python2.7/site-packages/keras/engine/topology.pyc in create_input_layer(self, batch_input_shape, input_dtype, name)
368 # and create the node connecting the current layer
369 # to the input layer we just created.
–> 370 self(x)
371
372 def assert_input_compatibility(self, input):
/home/prsahu/anaconda2/envs/fastAI/lib/python2.7/site-packages/keras/engine/topology.pyc in call(self, x, mask)
512 if inbound_layers:
513 # this will call layer.build() if necessary
–> 514 self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
515 input_added = True
516
/home/prsahu/anaconda2/envs/fastAI/lib/python2.7/site-packages/keras/engine/topology.pyc in add_inbound_node(self, inbound_layers, node_indices, tensor_indices)
570 # creating the node automatically updates self.inbound_nodes
571 # as well as outbound_nodes on inbound layers.
–> 572 Node.create_node(self, inbound_layers, node_indices, tensor_indices)
573
574 def get_output_shape_for(self, input_shape):
/home/prsahu/anaconda2/envs/fastAI/lib/python2.7/site-packages/keras/engine/topology.pyc in create_node(cls, outbound_layer, inbound_layers, node_indices, tensor_indices)
147
148 if len(input_tensors) == 1:
–> 149 output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
150 output_masks = to_list(outbound_layer.compute_mask(input_tensors[0], input_masks[0]))
151 # TODO: try to auto-infer shape if exception is raised by get_output_shape_for
/home/prsahu/anaconda2/envs/fastAI/lib/python2.7/site-packages/keras/layers/core.pyc in call(self, x, mask)
554 if ‘mask’ in arg_spec.args:
555 arguments[‘mask’] = mask
–> 556 return self.function(x, **arguments)
557
558 def get_config(self):
/home/prsahu/Downloads/courses-master/deeplearning1/nbs/vgg16.pyc in vgg_preprocess(x)
21 def vgg_preprocess(x):
22 x = x - vgg_mean
—> 23 return x[:, ::-1] # reverse axis rgb->bgr
24
25
/home/prsahu/anaconda2/envs/fastAI/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.pyc in _SliceHelper(tensor, slice_spec)
305 if s.step not in (None, 1):
306 raise NotImplementedError(
–> 307 “Steps other than 1 are not currently supported”)
308 start = s.start if s.start is not None else 0
309 if start < 0:
NotImplementedError: Steps other than 1 are not currently supported