Skip to content

Conversation

@nateanl
Copy link
Member

@nateanl nateanl commented Jun 29, 2018

Summary:
This operator is similar to PackSegmentsOp but with an additional option dim.
Input: a UNKNOWN_DIM * D tensor and a lengths tensor. The shape of lengths is UNKNOWN_DIM
The output will be UNKNOWN_DIM * dim * D

Differential Revision: D8702782

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.

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

@bddppq bddppq self-requested a review July 5, 2018 17:16
Copy link
Contributor

@bddppq bddppq left a comment

Choose a reason for hiding this comment

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

IIUC what you wanna achieve is to use an argument (currently named dim, I suggest to rename it to max_length) to override the max_length dimension in the output? If so you can simply add this argument to the existing PackSegmentsOp operator.

@nateanl nateanl force-pushed the export-D8702782 branch from 2d4491c to 80df043 Compare July 5, 2018 20:48

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.

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.

@nateanl nateanl force-pushed the export-D8702782 branch from 80df043 to ba2de01 Compare July 5, 2018 21:27
@bddppq
Copy link
Contributor

bddppq commented Jul 5, 2018

@pytorchbot retest this please

Copy link
Contributor

@bddppq bddppq left a comment

Choose a reason for hiding this comment

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

LGTM

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

…ment (pytorch#9048)

Summary:
Closes pytorch#9048

max_length argument helps fix the shape of the output to be N * max_length * D, where N is the batch_size, D is the feature_dim.

Differential Revision: D8702782

fbshipit-source-id: 599dd40821a5ca119acb4d61162f194f222cfbfb
@nateanl nateanl force-pushed the export-D8702782 branch from ba2de01 to c6fc7e3 Compare July 6, 2018 13:57
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
…ment (pytorch#9048)

Summary:
Closes pytorch#9048

max_length argument helps fix the shape of the output to be N * max_length * D, where N is the batch_size, D is the feature_dim.

Reviewed By: bddppq

Differential Revision: D8702782

fbshipit-source-id: e30555608fee1c4a61cc95922f4a71c7f54903af
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.

3 participants