Skip to content

Conversation

@umanwizard
Copy link
Contributor

Follow-up to #13577

The idea is to take each values tensor, concatenate it with zeros before and after itself (along the dimension corresponding to the one we're catting the tensors along), to get a tensor corresponding to the values for that tensor in the result. Then we concatenate all of those together to get the final values tensor. (Hopefully, this will be more clear from the example in the comments).

The indices are more straightforward: since we aren't concatenating along a sparse dimension, they don't change at all, so all we need to do are concatenate the indices from the different tensors together.

@umanwizard
Copy link
Contributor Author

hmm... I thought my tests were passing, looks like I probably screwed something up here. Closing until I figure out how to fix it.

@umanwizard umanwizard closed this Nov 9, 2018
@umanwizard
Copy link
Contributor Author

should be fixed now

@umanwizard umanwizard reopened this Nov 9, 2018

This comment was marked as off-topic.

This comment was marked as off-topic.

@umanwizard umanwizard force-pushed the cat_sparse_along_dense_dim branch from a1b3a08 to acc06d4 Compare November 14, 2018 17:00

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Contributor

@weiyangfb weiyangfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Please address some minor nits

@weiyangfb weiyangfb self-assigned this Nov 20, 2018
@umanwizard umanwizard force-pushed the cat_sparse_along_dense_dim branch from acc06d4 to 7d5a525 Compare November 21, 2018 20:42
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@umanwizard has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@umanwizard has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Nov 26, 2018
… dimensions (#13761)

Summary:
Follow-up to #13577

The idea is to take each values tensor, concatenate it with zeros before and after itself (along the dimension corresponding to the one we're catting the tensors along), to get a tensor corresponding to the values for that tensor in the result. Then we concatenate all of those together to get the final values tensor. (Hopefully, this will be more clear from the example in the comments).

The indices are more straightforward: since we aren't concatenating along a sparse dimension, they don't change at all, so all we need to do are concatenate the indices from the different tensors together.
Pull Request resolved: pytorch/pytorch#13761

Differential Revision: D13160343

Pulled By: umanwizard

fbshipit-source-id: 13d7adecd369e0eebdf5bce3d90a51029b66bd1d
@ezyang ezyang added the merged label Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants