class
Preprocessing
[source]
Preprocessing
(preprocessing_type
:str
,name
:str
=None
,normalize
:bool
=False
)
A parent class for all data preprocessing strategies.
Type | Default | Details | |
---|---|---|---|
preprocessing_type |
str |
The type of the preprocessing, which can either be "problem" or "solution". Problem preprocessing preprocesses the data based on problem information like forces etc., while solution preprocessing uses solution specific information like stresses, densities etc. | |
name |
str |
None |
The name of the preprocessing. |
normalize |
bool |
False |
Whether to normalize the output of the preprocessing. |
Preprocessing.__call__
[source]
Preprocessing.__call__
(problem_or_solution
:Union
[ForwardRef('dl4to.problem.Problem')
,ForwardRef('dl4to.solution.Solution')
])
Applies the preprocessing and returns a torch.Tensor
object.
Type | Default | Details | |
---|---|---|---|
problem_or_solution |
typing.Union[ForwardRef('dl4to.problem.Problem'), ForwardRef('dl4to.solution.Solution')] |
A problem or solution object. |
Preprocessing.__add__
[source]
Preprocessing.__add__
(preprocessing
:dl4to.preprocessing.Preprocessing
)
Summation of two preprocessings results in a new combined preprocessing that concatenates the output of both. Returns a dl4to.preprocessing.CombinedPreprocessing
object.
Type | Default | Details | |
---|---|---|---|
preprocessing |
dl4to.preprocessing.Preprocessing |
The preprocessing that should be added to the current one. |
class
CombinedPreprocessing
[source]
CombinedPreprocessing
(preprocessing1
:dl4to.preprocessing.Preprocessing
,preprocessing2
:dl4to.preprocessing.Preprocessing
) ::Preprocessing
A class that results from the summation of two criteria.
Type | Default | Details | |
---|---|---|---|
preprocessing1 |
dl4to.preprocessing.Preprocessing |
The first preprocessing. | |
preprocessing2 |
dl4to.preprocessing.Preprocessing |
The second preprocessing. |