class MHR(Module):
  __parameters__ = []
  __buffers__ = []
  training : bool
  _is_full_backward_hook : Optional[bool]
  character_torch : __torch__.pymomentum.torch.character.___torch_mangle_5.Character
  def forward(self: __torch__.mhr.mhr.___torch_mangle_6.MHR,
    identity_coeffs: Tensor,
    model_parameters: Tensor,
    face_expr_coeffs: Tensor) -> Tuple[Tensor, Tensor]:
    _0 = __torch__.pymomentum.backend.skel_state_backend.global_skel_state_from_local_skel_state_impl
    _1 = __torch__.pymomentum.backend.skel_state_backend.skin_points_from_skel_state
    character_torch = self.character_torch
    linear_blend_skinning = character_torch.linear_blend_skinning
    vert_indices_flattened = linear_blend_skinning.vert_indices_flattened
    character_torch0 = self.character_torch
    linear_blend_skinning0 = character_torch0.linear_blend_skinning
    skin_weights_flattened = linear_blend_skinning0.skin_weights_flattened
    character_torch1 = self.character_torch
    linear_blend_skinning1 = character_torch1.linear_blend_skinning
    skin_indices_flattened = linear_blend_skinning1.skin_indices_flattened
    character_torch2 = self.character_torch
    linear_blend_skinning2 = character_torch2.linear_blend_skinning
    inverse_bind_pose = linear_blend_skinning2.inverse_bind_pose
    character_torch3 = self.character_torch
    skeleton = character_torch3.skeleton
    pmi = skeleton.pmi
    character_torch4 = self.character_torch
    skeleton0 = character_torch4.skeleton
    joint_prerotations = skeleton0.joint_prerotations
    character_torch5 = self.character_torch
    skeleton1 = character_torch5.skeleton
    joint_translation_offsets = skeleton1.joint_translation_offsets
    character_torch6 = self.character_torch
    parameter_transform = character_torch6.parameter_transform
    parameter_transform0 = parameter_transform.parameter_transform
    character_torch7 = self.character_torch
    blend_shape = character_torch7.blend_shape
    base_shape = blend_shape.base_shape
    character_torch8 = self.character_torch
    blend_shape0 = character_torch8.blend_shape
    shape_vectors = blend_shape0.shape_vectors
    _2 = ops.prim.NumToTensor(torch.size(model_parameters, 0))
    identity_coeffs0 = torch.expand(identity_coeffs, [int(_2), -1])
    _3 = [identity_coeffs0, face_expr_coeffs]
    _4 = torch.einsum("nvd, ...n -> ...vd", [shape_vectors, torch.cat(_3, 1)])
    rest_vertex_positions = torch.add(_4, base_shape)
    _5 = ops.prim.NumToTensor(torch.size(model_parameters, 0))
    model_padding = torch.new_zeros(model_parameters, [int(_5), 117], dtype=None, layout=None, device=None, pin_memory=False)
    _6 = torch.cat([model_parameters, model_padding], 1)
    joint_params = torch.einsum("dn,...n->...d", [parameter_transform0, _6])
    _7 = ops.prim.NumToTensor(torch.size(joint_params, 0))
    joint_parameters = torch.view(joint_params, [int(_7), -1, 7])
    _8 = torch.slice(joint_parameters, 2, 0, 3)
    _9 = torch.unsqueeze(joint_translation_offsets, 0)
    _10 = torch.slice(_9, 1, 0, 9223372036854775807)
    local_state_t = torch.add(_8, _10)
    euler_xyz = torch.slice(joint_parameters, 2, 3, 6)
    roll, pitch, yaw, = torch.unbind(euler_xyz, -1)
    cy = torch.cos(torch.mul(yaw, CONSTANTS.c0))
    sy = torch.sin(torch.mul(yaw, CONSTANTS.c0))
    cp = torch.cos(torch.mul(pitch, CONSTANTS.c0))
    sp = torch.sin(torch.mul(pitch, CONSTANTS.c0))
    cr = torch.cos(torch.mul(roll, CONSTANTS.c0))
    sr = torch.sin(torch.mul(roll, CONSTANTS.c0))
    x = torch.sub(torch.mul(torch.mul(sr, cp), cy), torch.mul(torch.mul(cr, sp), sy))
    y = torch.add(torch.mul(torch.mul(cr, sp), cy), torch.mul(torch.mul(sr, cp), sy))
    z = torch.sub(torch.mul(torch.mul(cr, cp), sy), torch.mul(torch.mul(sr, sp), cy))
    w = torch.add(torch.mul(torch.mul(cr, cp), cy), torch.mul(torch.mul(sr, sp), sy))
    q = torch.stack([x, y, z, w], -1)
    q0 = torch.unsqueeze(joint_prerotations, 0)
    x1, y1, z1, w1, = torch.unbind(q0, -1)
    x2, y2, z2, w2, = torch.unbind(q, -1)
    _11 = torch.add(torch.mul(w1, x2), torch.mul(x1, w2))
    x0 = torch.sub(torch.add(_11, torch.mul(y1, z2)), torch.mul(z1, y2))
    _12 = torch.sub(torch.mul(w1, y2), torch.mul(x1, z2))
    y0 = torch.add(torch.add(_12, torch.mul(y1, w2)), torch.mul(z1, x2))
    _13 = torch.add(torch.mul(w1, z2), torch.mul(x1, y2))
    z0 = torch.add(torch.sub(_13, torch.mul(y1, x2)), torch.mul(z1, w2))
    _14 = torch.sub(torch.mul(w1, w2), torch.mul(x1, x2))
    w0 = torch.sub(torch.sub(_14, torch.mul(y1, y2)), torch.mul(z1, z2))
    local_state_q = torch.stack([x0, y0, z0, w0], -1)
    _15 = torch.slice(joint_parameters, 2, 6, 9223372036854775807)
    local_state_s = torch.exp(torch.mul(_15, CONSTANTS.c1))
    _16 = [local_state_t, local_state_q, local_state_s]
    local_skel_state = torch.cat(_16, -1)
    _17 = torch.split_with_sizes(pmi, [65, 56, 62, 83], 1)
    _18, _19, _20, _21, = _17
    _22 = _0(local_skel_state, [_18, _19, _20, _21], True, True, )
    skel_state, _23, = _22
    inverse_bind_pose0 = torch.unsqueeze(inverse_bind_pose, 0)
    _24 = _1(rest_vertex_positions, skel_state, inverse_bind_pose0, skin_indices_flattened, skin_weights_flattened, vert_indices_flattened, )
    return (_24, skel_state)
