New Model, Many Changes
This commit is contained in:
@@ -94,7 +94,7 @@ class Config(ConfigParser, ABC):
|
||||
try:
|
||||
return locate_and_import_class(self.model.type)
|
||||
except AttributeError as e:
|
||||
raise AttributeError(f'The model alias you provided ("{self.get("model", "type")}")' +
|
||||
raise AttributeError(f'The model alias you provided ("{self.get("model", "type")}") ' +
|
||||
f'was not found!\n' +
|
||||
f'{e}')
|
||||
|
||||
|
@@ -13,6 +13,10 @@ from torch import nn
|
||||
# Hyperparamter Object
|
||||
class ModelParameters(Namespace, Mapping):
|
||||
|
||||
@property
|
||||
def activation_as_string(self):
|
||||
return self['activation'].lower()
|
||||
|
||||
@property
|
||||
def module_kwargs(self):
|
||||
|
||||
@@ -56,6 +60,7 @@ class ModelParameters(Namespace, Mapping):
|
||||
|
||||
_activations = dict(
|
||||
leaky_relu=nn.LeakyReLU,
|
||||
gelu=nn.GELU,
|
||||
elu=nn.ELU,
|
||||
relu=nn.ReLU,
|
||||
sigmoid=nn.Sigmoid,
|
||||
|
Reference in New Issue
Block a user