21 lines
530 B
Python
21 lines
530 B
Python
from abc import ABC, abstractmethod
|
|
|
|
from tests.base.dataloaders import CustomInfDataloader
|
|
|
|
|
|
class ValDataloaderVariations(ABC):
|
|
|
|
@abstractmethod
|
|
def dataloader(self, train: bool):
|
|
"""placeholder"""
|
|
|
|
def val_dataloader(self):
|
|
return self.dataloader(train=False)
|
|
|
|
def val_dataloader__multiple(self):
|
|
return [self.dataloader(train=False),
|
|
self.dataloader(train=False)]
|
|
|
|
def val_dataloader__infinite(self):
|
|
return CustomInfDataloader(self.dataloader(train=False))
|