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

Subsampling is not consistent across epochs #4

Open
amratanshu opened this issue Dec 21, 2020 · 0 comments
Open

Subsampling is not consistent across epochs #4

amratanshu opened this issue Dec 21, 2020 · 0 comments

Comments

@amratanshu
Copy link

The indices tensor for each sentence is repeated along axis=0.

indices tensor ->
Sentence 1 (1D) occurs #epoch times
Sentence 2 (1D) occurs #epoch times
and so on

Then subsample() func is called on each 1D element of indices tensor inside
dataset = dataset.map(lambda indices, progress: (subsample(indices, keep_probs), progress))
Subsampling is done using random variables which compare with keepProb list (keeping probabilities of words)

The way this is implemented, each epoch will have different versions of subsampled indices tensor for sentences because of the random nature of subsampling

Somehow the tf.repeat(indices) should be done after subsampling each sentence so that a subsampled sentence is repeated #epoch times instead of each epoch containing different versions of the same sentence.

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