Nb_val_samples Error

I am stuck at following code, please help resolving this.

vgg = Vgg16()
#Grab a few images at a time for training and validation.
#NB: They must be in subdirectories named based on their category
batches = vgg.get_batches(path+‘train’, batch_size=batch_size)
val_batches = vgg.get_batches(path+‘valid’, batch_size=batch_size*2)
vgg.fit(batches, val_batches, nb_epoch=1)

Getting error:

ValueError: When using a generator for validation data, you must specify a value for “nb_val_samples”.

This is late but looking at your number of images found, there is something wrong with your path.