Source code for HALF.Interfaces.IDataset
from abc import ABC, abstractmethod
from torch.utils.data import Dataset
[docs]class IDataset(ABC, Dataset):
"""
Interface for Dataset methods
"""
[docs] @abstractmethod
def create_datasets(self):
"""
This method should create the labeled, unlabeled and test datasets (pytorch.utils.data.Dataset)
"""
pass
@property
@abstractmethod
def train_transform(self):
"""
List of tranforms operations for train set
"""
pass
@property
@abstractmethod
def test_transform(self):
"""
List of tranforms operations for test set
"""
pass