Image64Dataset
npfl138.datasets.image64_dataset.Image64Dataset
Source code in npfl138/datasets/image64_dataset.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
Element
class-attribute
instance-attribute
The type of a single dataset element.
Dataset
Bases: TFRecordDataset
Source code in npfl138/datasets/image64_dataset.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
__len__
__len__() -> int
Return the number of elements in the dataset.
Source code in npfl138/datasets/image64_dataset.py
33 34 35 | |
__init__
Load the given dataset, downloading it if necessary.
Parameters:
-
name(str) –The name of the dataset, for example
oxford_flowers102. -
decode_on_demand(bool, default:False) –if
False(the default), the images are fully decoded when the dataset is loaded; ifTrue, the images are loaded as byte strings and decoded on demand when accessed.
Source code in npfl138/datasets/image64_dataset.py
48 49 50 51 52 53 54 55 56 57 58 | |