Update pipeline.py
Browse files- pipeline.py +8 -0
pipeline.py
CHANGED
@@ -7,6 +7,14 @@ import os
|
|
7 |
import json
|
8 |
import numpy as np
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
print('PIPELINE')
|
11 |
|
12 |
class ImageClassificationPipeline:
|
|
|
7 |
import json
|
8 |
import numpy as np
|
9 |
|
10 |
+
dls = DataBlock(
|
11 |
+
blocks=(ImageBlock, CategoryBlock),
|
12 |
+
get_items=get_image_files,
|
13 |
+
splitter=RandomSplitter(valid_pct=0.2, seed=42),
|
14 |
+
get_y=parent_label,
|
15 |
+
item_tfms=[Resize(192, method='squish')]
|
16 |
+
).dataloaders(path, bs=32)
|
17 |
+
|
18 |
print('PIPELINE')
|
19 |
|
20 |
class ImageClassificationPipeline:
|