Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does cuBERT support sequence tagging output? #7

Open
wolfshow opened this issue Mar 28, 2019 · 1 comment
Open

Does cuBERT support sequence tagging output? #7

wolfshow opened this issue Mar 28, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@wolfshow
Copy link

I am working on a sequence tagging task, where the logits output should be [batchsize * sequence length]. Does cuBERT support that?

@levyfan
Copy link
Contributor

levyfan commented Apr 1, 2019

Currently, we only support standard BERT graph and standard BERT outputs, in your case the most related output type I guess is model.get_sequence_output() with size [batch_size * sequence_length * hidden_size].

You can fork our repository and make some modification if you want [batch_size * sequence_length] (I guess you put some additional layers after standard BERT). Or you can also get our model.get_sequence_output() and make the computation to another separate graph by tensoflow.

You can have a look at AdditionalOutputLayer, which takes [batch_size, hidden_size] from model.get_pooled_output(), and then apply a dot-product to produce [batch_size, 1] vector.

@levyfan levyfan added the enhancement New feature or request label Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants