LinearModule
This commit is contained in:
@ -18,19 +18,12 @@ class ModelParameters(Namespace, Mapping):
|
||||
|
||||
paramter_mapping.update(
|
||||
dict(
|
||||
activation=self._activations[paramter_mapping['activation']]
|
||||
activation=self._activations[self['activation']]
|
||||
)
|
||||
)
|
||||
|
||||
return paramter_mapping
|
||||
|
||||
@property
|
||||
def test_activation(self):
|
||||
try:
|
||||
return self._activations[self.model.activation]
|
||||
except KeyError:
|
||||
return nn.ReLU
|
||||
|
||||
def __getitem__(self, k):
|
||||
# k: _KT -> _VT_co
|
||||
return self.__dict__[k]
|
||||
|
Reference in New Issue
Block a user