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

Sparse tensor¶

class torch_lattice.tensor.SparseTensor(feats, coords, stride=1, spatial_range=None)[source]¶

Bases: object

Parameters:
  • feats (Tensor)

  • coords (Tensor)

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

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

property F: Tensor¶
property C: Tensor¶
property s: Tuple[int, ...]¶
cpu()[source]¶
cuda()[source]¶
half()[source]¶
detach()[source]¶
to(device, non_blocking=True)[source]¶
Parameters:

non_blocking (bool)

dense()[source]¶
Next
Backend flags
Previous
Top-level package
Copyright © 2026, Z.Y. Lin
Made with Sphinx and @pradyunsg's Furo
On this page
  • Sparse tensor
    • SparseTensor
      • SparseTensor.F
      • SparseTensor.C
      • SparseTensor.s
      • SparseTensor.cpu()
      • SparseTensor.cuda()
      • SparseTensor.half()
      • SparseTensor.detach()
      • SparseTensor.to()
      • SparseTensor.dense()