Inverse of to_dense_batch
?
#6948
Boltzmachine
started this conversation in
General
Replies: 1 comment 2 replies
-
You can simply do x, mask = to_dense_batch(x, batch)
x = x[mask] |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a function which is the inverse of
to_dense_batch
? i.e. takes in atensor
of size[bs, Nmax, dim]
and amask
of size[bs, Nmax]
, and returns thetensor
of size[N, dim]
and its batch indicatorbatch
of size[N]
.I notice there's a function called
dense_to_sparse
, but it only deals withadj
.Beta Was this translation helpful? Give feedback.
All reactions