Current version of Inception_v3 doesn't have a layer named 'flatten' so the code crashes when extract_image_features is set to True.
In this older version, it's clear that the 'flatten' layer used to be the one right before the dense one at the end, therefore I suggest that L232 of train.py be replaced with output=base_model.get_layer('avg_pool').output)!
Not sure the change is worth a PR to be honest...