MCPcopy Create free account
hub / github.com/OpenMeshLab/MeshXL / loss_wrapper

Method loss_wrapper

models/mesh_xl/get_model.py:79–83  ·  view source on GitHub ↗
(self, loss: Tensor)

Source from the content-addressed store, hash-verified

77
78
79 def loss_wrapper(self, loss: Tensor) -> Tensor:
80 # parameter activation: it is a l2 loss with 0 weight
81 for param in self.parameters():
82 loss += 0 * torch.sum(param ** 2)
83 return loss
84
85
86 def train_one_step(self, data_dict: dict) -> dict:

Callers 1

train_one_stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected