Templates finalized

This commit is contained in:
Steffen Illium
2020-05-17 22:05:20 +02:00
parent 398504aee6
commit fc93f71608
20 changed files with 459 additions and 166 deletions

View File

@ -70,7 +70,8 @@ class Config(ConfigParser, ABC):
try:
return self._model_map[self.model.type]
except KeyError:
raise KeyError(rf'The model alias you provided ("{self.get("model", "type")}") does not exist! Try one of these: {list(self._model_map.keys())}')
raise KeyError(f'The model alias you provided ("{self.get("model", "type")}")' +
'does not exist! Try one of these: {list(self._model_map.keys())}')
# TODO: Do this programmatically; This did not work:
# Initialize Default Sections as Property

View File

@ -5,7 +5,7 @@ from pytorch_lightning.loggers.base import LightningLoggerBase
from pytorch_lightning.loggers.neptune import NeptuneLogger
from pytorch_lightning.loggers.test_tube import TestTubeLogger
from ml_lib.utils.config import Config
from utils.config import Config
class Logger(LightningLoggerBase, ABC):

View File

@ -1,8 +1,8 @@
from torchvision.transforms import ToTensor as TorchvisionToTensor
from torchvision.transforms import ToTensor as TorchVisionToTensor
class ToTensor(TorchvisionToTensor):
class ToTensor(TorchVisionToTensor):
def __call__(self, pic):
tensor = super(ToTensor, self).__call__(pic).float()
return tensor
return tensor