Allows to declare easily an external value class, which is useful to avoid initialising resources (e.g. torch) when not needed
class Model(Config):
...
@Model.value
class TorchModel(Model, nn.Module):
...
class SubModel(Model):
...
@SubModel.value
class TorchSubModel(SubModel, TorchModel):
"We need to inherit from both the configuration `SubModel` and the `Model` value, i.e. `TorchModel`"
...
Allows to declare easily an external value class, which is useful to avoid initialising resources (e.g. torch) when not needed
valueclass method which should test whether the value classes (1) is a subclass of the configuration, (2) is a subclass of the parent configuration values (if any)Ahas a value classAValue,SubAhas none, andSubSubAhas, then the latter inherits fromSubA.XPMValueand thatSubA.XPMValueimplicitely inherits dromAValue