Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Add shuffling to examples in example features #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johnvorsten
Copy link

Example_features are made of tensors of shape (batch_size, list_size,
feature_space). If examples are passed in a predictable order (ex.
ranked from most relevant to least relevant) the model might not generalize
well. Add 'shuffle_peritem':True to the Estimator's params to shuffle
example features and labels along list_size.

For example, when creating the estimator add the key:value pair 'shuffle_peritem':True

ranker = tf.estimator.Estimator(
    model_fn=model_fn,
    model_dir=_MODEL_DIR,
    config=run_config,
    params={'shuffle_peritem':True})

Example_features are made of tensors of shape (batch_size, list_size,
feature_space). If examples are passed in a predictable order (ex.
ranked from most relevant to least relevant) the model might not generalize
well. Add 'shuffle_peritem':True to the Estimator's params to shuffle
example features and labels along list_size.
@eggie5
Copy link
Contributor

eggie5 commented Feb 25, 2020

Do you see any difference in practice?

@johnvorsten
Copy link
Author

I did not see a difference in practice over my original dataset. However I’m not sure there was any relationship between my input features and my target ranking in the first place.

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

Successfully merging this pull request may close these issues.

3 participants