Commit 5e44dfde authored by Olegs NIKISINS's avatar Olegs NIKISINS
Browse files

Added the doc to the __init__ in data_folder, to fix the sphinx warning

parent 842c9bbd
Pipeline #26276 failed with stage
in 7 minutes and 7 seconds
......@@ -147,6 +147,48 @@ class DataFolder(data.Dataset):
purposes=['real', 'attack'],
allow_missing_files = True,
**kwargs):
"""
Attributes
----------
data_folder : str
A directory containing the training data.
transform : callable
A function/transform that takes in a PIL image, and returns a
transformed version. E.g, ``transforms.RandomCrop``. Default: None.
extension : str
Extension of the data files. Default: ".hdf5".
Note: this is the only extension supported at the moment.
bob_hldi_instance : object
An instance of the HLDI interface. Only HLDI's of bob.pad.face
are currently supported.
hldi_type : str
String defining the type of the HLDI. Default: "pad".
Note: this is the only option currently supported.
groups : str or [str]
The groups for which the clients should be returned.
Usually, groups are one or more elements of ['train', 'dev', 'eval'].
Default: ['train', 'dev', 'eval'].
protocol : str
The protocol for which the clients should be retrieved.
Default: 'grandtest'.
purposes : str or [str]
The purposes for which File objects should be retrieved.
Usually it is either 'real' or 'attack'.
Default: ['real', 'attack'].
allow_missing_files : bool
The missing files in the ``data_folder`` will not break the
execution if set to True.
Default: True.
"""
self.data_folder = data_folder
self.transform = transform
......@@ -239,8 +281,8 @@ class DataFolder(data.Dataset):
#==========================================================================
def __len__(self):
"""
Attributes
----------
Returns
-------
len : int
The length of the file list.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment