提交 7cb9cea8 编写于 作者: S suweiyue

fix neg_type bug

上级 4e5c920a
...@@ -31,7 +31,7 @@ final_fc: true ...@@ -31,7 +31,7 @@ final_fc: true
final_l2_norm: true final_l2_norm: true
loss_type: "hinge" loss_type: "hinge"
margin: 0.3 margin: 0.3
neg_type: "random_neg" neg_type: "batch_neg"
# infer config ------ # infer config ------
infer_model: "./output/last" infer_model: "./output/last"
......
...@@ -31,7 +31,7 @@ final_fc: true ...@@ -31,7 +31,7 @@ final_fc: true
final_l2_norm: true final_l2_norm: true
loss_type: "hinge" loss_type: "hinge"
margin: 0.3 margin: 0.3
neg_type: "random_neg" neg_type: "batch_neg"
# infer config ------ # infer config ------
infer_model: "./output/last" infer_model: "./output/last"
......
...@@ -73,7 +73,7 @@ class GraphGenerator(BaseDataGenerator): ...@@ -73,7 +73,7 @@ class GraphGenerator(BaseDataGenerator):
batch_src = np.array(batch_src, dtype="int64") batch_src = np.array(batch_src, dtype="int64")
batch_dst = np.array(batch_dst, dtype="int64") batch_dst = np.array(batch_dst, dtype="int64")
if neg_type == "batch_neg": if self.neg_type == "batch_neg":
neg_shape = [1] neg_shape = [1]
else: else:
neg_shape = batch_dst.shape neg_shape = batch_dst.shape
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册