torch.Tensor.coalesce
- Tensor.coalesce() Tensor
Returns a coalesced copy of
self
ifself
is an uncoalesced tensor.Returns
self
ifself
is a coalesced tensor.Warning
Throws an error if
self
is not a sparse COO tensor.
Run PyTorch locally or get started quickly with one of the supported cloud platforms
TutorialsWhats new in PyTorch tutorials
Learn the BasicsFamiliarize yourself with PyTorch concepts and modules
PyTorch RecipesBite-size, ready-to-deploy PyTorch code examples
Intro to PyTorch - YouTube SeriesMaster PyTorch basics with our engaging YouTube tutorial series
Learn about the tools and frameworks in the PyTorch Ecosystem
CommunityJoin the PyTorch developer community to contribute, learn, and get your questions answered
ForumsA place to discuss PyTorch code, issues, install, research
Developer ResourcesFind resources and get questions answered
Contributor Awards - 2024Award winners announced at this year's PyTorch Conference
Catch up on the latest technical news and happenings
Community BlogStories from the PyTorch ecosystem
VideosLearn about the latest PyTorch tutorials, new, and more
Community StoriesLearn how our community solves real, everyday machine learning problems with PyTorch
EventsFind events, webinars, and podcasts
NewsletterStay up-to-date with the latest updates
Returns a coalesced copy of self
if self
is an
uncoalesced tensor.
Returns self
if self
is a coalesced tensor.
Warning
Throws an error if self
is not a sparse COO tensor.
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.