def get_image_batch(generator,batch_size):
	"""keras generators may generate an incomplete batch for the last batch"""
	img_batch = generator.next()
	if len(img_batch) != batch_size:
		img_batch = generator.next()
	
	assert len(img_batch) == batch_size
	return img_batch