Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[OP] Fix SequenceMask to support different datatypes for data / sequence_length #15404

Closed
sxjscience opened this issue Jun 28, 2019 · 2 comments
Labels

Comments

@sxjscience
Copy link
Member

Currently, the SequenceMask operator does not support different dtypes for data and sequence_length. Usually, we could set data.dtype = np.float32 and sequence_length.dtype = np.int32. However, it's not allowed due to this line: https://github.com/apache/incubator-mxnet/blob/master/src/operator/sequence_mask-inl.h#L220

We should fix it.

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Feature

@stephenrawls
Copy link
Contributor

Hi @sxjscience . I agree this is an annoying issue now, causing you to cast your sequence length tensor to be the same type of your data tensor. I fixed this back in January in this PR: #13880

It didn't get merged in time to make it into MXNet 1.4, but it will be in MXNet 1.5 when that release happens. So hang tight :)

Best,
Stephen

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants