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
071e959a
Commit
071e959a
authored
Mar 27, 2016
by
DESHPANDE SRIJAY PARAG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restoring code to original
parent
e4b49cd7
Pipeline
#56
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
word2vec.c
word2vec.c
+3
-3
No files found.
word2vec.c
View file @
071e959a
...
...
@@ -518,12 +518,12 @@ void *TrainModelThread(void *id) {
}
l2
=
target
*
layer1_size
;
f
=
0
;
for
(
c
=
0
;
c
<
layer1_size
;
c
++
)
f
+=
syn0
[
c
+
l1
]
*
syn
0
[
c
+
l2
];
for
(
c
=
0
;
c
<
layer1_size
;
c
++
)
f
+=
syn0
[
c
+
l1
]
*
syn
1neg
[
c
+
l2
];
if
(
f
>
MAX_EXP
)
g
=
(
label
-
1
)
*
alpha
;
else
if
(
f
<
-
MAX_EXP
)
g
=
(
label
-
0
)
*
alpha
;
else
g
=
(
label
-
expTable
[(
int
)((
f
+
MAX_EXP
)
*
(
EXP_TABLE_SIZE
/
MAX_EXP
/
2
))])
*
alpha
;
for
(
c
=
0
;
c
<
layer1_size
;
c
++
)
neu1e
[
c
]
+=
g
*
syn
0
[
c
+
l2
];
for
(
c
=
0
;
c
<
layer1_size
;
c
++
)
syn
0
[
c
+
l2
]
+=
g
*
syn0
[
c
+
l1
];
for
(
c
=
0
;
c
<
layer1_size
;
c
++
)
neu1e
[
c
]
+=
g
*
syn
1neg
[
c
+
l2
];
for
(
c
=
0
;
c
<
layer1_size
;
c
++
)
syn
1neg
[
c
+
l2
]
+=
g
*
syn0
[
c
+
l1
];
}
// Learn weights input -> hidden
for
(
c
=
0
;
c
<
layer1_size
;
c
++
)
syn0
[
c
+
l1
]
+=
neu1e
[
c
];
...
...
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