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

added init_epoch to Glove.fit #89

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

Conversation

IFuentesSR
Copy link

Each time that we called the fit method, the weights were randomly initiated, not allowing a warm start. Therefore, we just added a way to allow the model to resume the training.
Regards

self.no_components) - 0.5)
/ self.no_components)
self.word_biases = np.zeros(shape[0],
dtype=np.float64)

self.vectors_sum_gradients = np.ones_like(self.word_vectors)
self.biases_sum_gradients = np.ones_like(self.word_biases)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please vectors_sum_gradients and biases_sum_gradients put in the if statement

if initial_epoch == 0:
        ...
        self.vectors_sum_gradients = np.ones_like(self.word_vectors)
        self.biases_sum_gradients = np.ones_like(self.word_biases)

Because using it to update learning rate in fit_vectors

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

Successfully merging this pull request may close these issues.

None yet

2 participants