Skip to content

Commit

Permalink
added dataset abstract method
Browse files Browse the repository at this point in the history
  • Loading branch information
mooniean committed Jan 29, 2024
1 parent 013839b commit e619888
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/caked/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from abc import ABC, abstractmethod
from pathlib import Path

from torch.utils.data import DataLoader, Dataset


class AbstractDataLoader(DataLoader, ABC):
@abstractmethod
def read(self, pipeline, classes, volume_size, dataset_size, save_to_disk):
pass

@abstractmethod
def process(self, dataset, classes, split_size, batch_size, training):
pass


class AbstractDataset(ABC, Dataset):
def __init__(self, origin: str, classes: Path) -> None:
pass

def __len__(self) -> int:
pass

@abstractmethod
def set_len(self, length:int):
pass

@abstractmethod
def augment(self, augment:bool, aug_type:str):
pass

0 comments on commit e619888

Please sign in to comment.