Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
word2vec
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
35
Issues
35
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DESHPANDE SRIJAY PARAG
word2vec
Commits
485f30ff
Commit
485f30ff
authored
Jul 30, 2013
by
tmikolov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor bug fix
parent
62614147
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
word2vec.c
word2vec.c
+3
-2
No files found.
word2vec.c
View file @
485f30ff
...
...
@@ -163,6 +163,7 @@ void SortVocab() {
train_words
+=
vocab
[
a
].
cn
;
}
}
vocab_size
++
;
vocab
=
(
struct
vocab_word
*
)
realloc
(
vocab
,
vocab_size
*
sizeof
(
struct
vocab_word
));
// Allocate memory for the binary tree construction
for
(
a
=
0
;
a
<
vocab_size
;
a
++
)
{
...
...
@@ -385,8 +386,8 @@ void *TrainModelThread(void *id) {
while
(
1
)
{
word
=
ReadWordIndex
(
fi
);
if
(
feof
(
fi
))
break
;
word_count
++
;
if
(
word
==
-
1
)
continue
;
word_count
++
;
if
(
word
==
0
)
break
;
// The subsampling randomly discards frequent words while keeping the ranking same
if
(
sample
>
0
)
{
...
...
@@ -681,4 +682,4 @@ int main(int argc, char **argv) {
}
TrainModel
();
return
0
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment