tracel-ai/burn

Support Sparse Tensors

オープン

#846 opened on 2023/10/04

 (12 件のコメント) (5 件のリアクション) (0 人の担当者)Rust (964 件のフォーク)auto 404
featurehelp wanted

Repository metrics

Stars
 (15,550 個のスター)
PR merge metrics
 (平均マージ 2d 22h) (30d で 129 merged PRs)

説明

Feature description

A tensor representation that only stores data for positions where the value non-zero. Operations on sparse tensors could then be optimized based on the fact that most of the tensor is empty and only a few points need to be computed.

Feature motivation

Sometimes I (and others) deal with cases where tensors are always largely empty (often less than 1% full). In such cases, it would much more efficient (memory-wise and computationally) to only store data for indexes that are used. This is especially important for scenarios when the tensor would be very large if it were represented in a dense representation.

(Optional) Suggest a Solution

I don't have a concrete idea how this might be implemented, I imagine existing libraries (such as sprs in rust, or in other ecosystems) can serve as inspiration.

コントリビューターガイド