digeo.optim.MeshLossFunc#
- class digeo.optim.MeshLossFunc[source]#
Bases:
ABC- abstractmethod compute(mesh, points)[source]#
Loss function used in the mesh optimisers.
- Parameters:
mesh (Mesh) – The mesh used
points (MeshPointBatch) – The points on the mesh that are being optimized
- Returns:
loss (float) – The loss of the function
gradient (Tensor) – The gradients in 3d space for each point
- Return type:
Tuple[float, Tensor]
- get_logs()[source]#
Optionnal method to return any additional information that should be logged during optimization, such as the value of certain terms in the loss function, or any other relevant information.
- Returns:
logs – A dictionary containing the information to log, where the keys are the names of the metrics and the values are the corresponding values to log.
- Return type:
dict[str, Any]