Class: Gsplat::Ops::DepthFeatures
- Inherits:
-
Autograd::Function
- Object
- Autograd::Function
- Gsplat::Ops::DepthFeatures
- Defined in:
- lib/gsplat/ops/tensor_shape_ops.rb
Overview
Adds a singleton feature axis to depths.
Class Method Summary collapse
Methods inherited from Autograd::Function
Class Method Details
.backward(_context, gradient) ⇒ Object
77 78 79 |
# File 'lib/gsplat/ops/tensor_shape_ops.rb', line 77 def backward(_context, gradient) [gradient.reshape(*gradient.shape[0...-1])] end |
.forward(_context, depths) ⇒ Object
73 74 75 |
# File 'lib/gsplat/ops/tensor_shape_ops.rb', line 73 def forward(_context, depths) depths.reshape(*(depths.shape + [1])) end |