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

package Bert #338

Open
Tavares8 opened this issue Nov 8, 2022 · 0 comments
Open

package Bert #338

Tavares8 opened this issue Nov 8, 2022 · 0 comments

Comments

@Tavares8
Copy link

Tavares8 commented Nov 8, 2022

How do I pack Bert into my textual data? I have query and document pairs, should I package only documents? I ask because of this definition:

SEQ_LENGTH = 64
context_feature_spec = {}
example_feature_spec = {
    'input_word_ids': tf.io.FixedLenFeature(
        shape=(SEQ_LENGTH,), dtype=tf.int64,
        default_value=[7] * SEQ_LENGTH),
    'input_mask': tf.io.FixedLenFeature(
        shape=(SEQ_LENGTH,), dtype=tf.int64,
        default_value=[7] * SEQ_LENGTH),
    'input_type_ids': tf.io.FixedLenFeature(
        shape=(SEQ_LENGTH,), dtype=tf.int64,
        default_value=[7] * SEQ_LENGTH)}
label_spec = (
    "relevance",
    tf.io.FixedLenFeature(shape=(1,), dtype=tf.int64, default_value=-1)
)

Onde context_feature_spec = { }

The antique dataset already has the keys - input_ids, input_mask, relevance e segment_ids.
How do I do this for my texts?

No model de ranking there is 'feature_name_mapping' which it shows what I should deliver and what the model expects.

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

No branches or pull requests

1 participant