Skip to content

Commit

Permalink
Update sentiment.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bojone authored Jun 17, 2019
1 parent 239e206 commit 244645d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __iter__(self):
x2_in = Input(shape=(None,))

x = bert_model([x1_in, x2_in])
x = Lambda(lambda x: x[:, 0])(x)
x = Lambda(lambda x: x[:, 0])(x) # 取出[CLS]对应的向量用来做分类
p = Dense(1, activation='sigmoid')(x)

model = Model([x1_in, x2_in], p)
Expand Down

0 comments on commit 244645d

Please sign in to comment.