πββοΈ INFO: If you have fixes/suggestions to for this doc, please comment below.
π STAR: This doc if you found this document helpful.
| import re | |
| replacement_patterns = [ | |
| (r'won\'t', 'will not'), | |
| (r'can\'t', 'cannot'), | |
| (r'i\'m', 'i am'), | |
| (r'ain\'t', 'is not'), | |
| (r'(\w+)\'ll', '\g<1> will'), | |
| (r'(\w+)n\'t', '\g<1> not'), | |
| (r'(\w+)\'ve', '\g<1> have'), |
| '''This script goes along the blog post | |
| "Building powerful image classification models using very little data" | |
| from blog.keras.io. | |
| It uses data that can be downloaded at: | |
| https://www.kaggle.com/c/dogs-vs-cats/data | |
| In our setup, we: | |
| - created a data/ folder | |
| - created train/ and validation/ subfolders inside data/ | |
| - created cats/ and dogs/ subfolders inside train/ and validation/ | |
| - put the cat pictures index 0-999 in data/train/cats |