Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1#!/usr/bin/env python 

2# coding=utf-8 

3 

4 

5def _maker(protocol): 

6 

7 from ....data.refuge import dataset as raw 

8 from ....data.transforms import CenterCrop, Pad, Resize 

9 from .. import make_dataset as mk 

10 

11 # due to different sizes, we need to make the dataset twice 

12 train = mk(raw.subsets(protocol), [Resize(1539), Pad((21, 46, 22, 47))]) 

13 # we'll keep "dev" and "test" from the next one 

14 retval = mk(raw.subsets(protocol), [CenterCrop(1632)]) 

15 # and we keep the "train" set with the right transforms 

16 retval["train"] = train["train"] 

17 return retval