Class: Gsplat::Ops::NormalizeQuaternion
- Inherits:
-
Autograd::Function
- Object
- Autograd::Function
- Gsplat::Ops::NormalizeQuaternion
- Defined in:
- lib/gsplat/ops/tensor_value_ops.rb
Overview
Last-axis quaternion normalization.
Class Method Summary collapse
Methods inherited from Autograd::Function
Class Method Details
.backward(context, gradient) ⇒ Object
82 83 84 |
# File 'lib/gsplat/ops/tensor_value_ops.rb', line 82 def backward(context, gradient) [Math::Quaternion.normalize_vjp(context.saved_values.first, gradient)] end |
.forward(context, value) ⇒ Object
77 78 79 80 |
# File 'lib/gsplat/ops/tensor_value_ops.rb', line 77 def forward(context, value) context.save(value) Math::Quaternion.normalize(value) end |