Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/moverseai/moai
Browse files Browse the repository at this point in the history
  • Loading branch information
tzole1155 committed Jun 20, 2024
2 parents 715db97 + dca8ee5 commit 9ddcffe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion moai/engine/run_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def on_train_batch_end(
Note: The value ``outputs["loss"]`` here will be the normalized value w.r.t ``accumulate_grad_batches`` of the
loss returned from ``training_step``.
"""
if C._MOAI_LOSSES_ in outputs and 'total' in outputs[C._MOAI_LOSSES_]:
if C._MOAI_LOSSES_ in outputs and "total" in outputs[C._MOAI_LOSSES_]:
if losses := toolz.merge(
outputs[f"{C._MOAI_LOSSES_}.weighted"],
{"total": outputs[f"{C._MOAI_LOSSES_}.total"]},
Expand Down
7 changes: 4 additions & 3 deletions moai/monads/human/pose/forward_kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
class ForwardKinematics(torch.nn.Module):
def __init__(
self,
parents: list,
offsets: list = None,
parents: typing.Optional[typing.Sequence[int]] = None,
offsets: typing.Optional[typing.Sequence[typing.Sequence[float]]] = None,
): # TODO: add a col/row major param to adjust offset slicing
super().__init__()
self.register_buffer("parents", torch.Tensor(parents).int())
if parents is not None:
self.register_buffer("parents", torch.Tensor(parents).int())
if offsets is not None:
log.warning("offset not set, should be passed in the forward method")
self.register_buffer("offsets", torch.Tensor(offsets))
Expand Down

0 comments on commit 9ddcffe

Please sign in to comment.