Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Torch Lattice
Torch Lattice

Getting started

  • Getting started
    • Installation
    • Quickstart
    • Workflow

Reference

  • Concepts
    • Sparse tensor model
    • Convolution semantics
    • Artifact contract
    • Migrating from TorchSparse
  • Tooling
    • Benchmarks
    • Conformance
    • CUDA CI and release build

API reference

  • API reference
    • Core APIs
      • Top-level package
      • Sparse tensor
      • Backend flags
    • Neural network modules
      • NN top-level exports
      • Convolution modules
      • Pooling modules
      • Activation modules
      • Normalization modules
      • BEV modules
      • Crop modules
      • NN utilities
    • Functional APIs
      • Functional top-level exports
      • Functional convolution
      • Convolution configuration
      • Functional pooling
      • Coordinate hashing
      • Coordinate query
      • Sparse relations
      • Voxelization
      • Dense conversion
      • Functional activation
      • Functional crop
      • Sparse count
    • Operator helpers
      • Sparse operators
      • Quantization helpers
      • Tuning helpers
    • Artifact APIs
      • Artifact IO
      • Artifact builder
      • FX lowering
    • Tooling APIs
      • Benchmark tooling
      • Conformance tooling

Project notes

  • Stability policy
  • Compatibility notes
  • Troubleshooting
Back to top
View this page
Edit this page

NN utilities¶

torch_lattice.nn.utils.apply.fapply(input, fn, *args, **kwargs)[source]¶
Return type:

SparseTensor

Parameters:
  • input (SparseTensor)

  • fn (Callable[[...], Tensor])

torch_lattice.nn.utils.kernel.get_kernel_offsets(size, stride=1, dilation=1, device='cpu')[source]¶
Return type:

Tensor

Parameters:
  • size (int | Tuple[int, ...])

  • stride (int | Tuple[int, ...])

  • dilation (int | Tuple[int, ...])

Next
Functional APIs
Previous
Crop modules
Copyright © 2026, Z.Y. Lin
Made with Sphinx and @pradyunsg's Furo
On this page
  • NN utilities
    • fapply()
    • get_kernel_offsets()