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

Create Text2RealProblem class for regression-based problems #1748

Merged
merged 5 commits into from
Nov 21, 2019

Conversation

gabegrand
Copy link
Contributor

A variety of NLP problems involve training regression models to predict continuous-valued ratings from text (e.g., sentiment scoring). While T2T supports several REAL modalities, there is no base class for regression-based text problems. This PR introduces a Text2RealProblem that is analogous to the existing Text2ClassProblem, but for regression problems.

The class also supports multitask regression via the ntasks property, which allows for the regression target to be an n-dimensional float vector.

Note that this PR doesn't contribute any additional problems to the registry (for now), since the datasets I've been training on are not public. That said, this base class makes it very straightforward to define a custom text regression problem, and I hope that it will be useful for other T2T users.

@lukaszkaiser This PR is very similar to the Gist you reviewed from me -- please let me know what you think!

@googlebot googlebot added the cla: yes PR author has signed CLA label Nov 20, 2019
@afrozenator
Copy link
Contributor

Thanks @gabegrand !!

@afrozenator afrozenator merged commit 259cbd0 into tensorflow:master Nov 21, 2019
afrozenator pushed a commit that referenced this pull request Nov 21, 2019
PiperOrigin-RevId: 281802220
@gabegrand
Copy link
Contributor Author

Much appreciated @afrozenator!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants