Skip to content

Commit 0ae0466

Browse files
committed
sparse tensor
1 parent 84c3d1f commit 0ae0466

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/fnn.cc

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ using namespace tensorflow;
1212
// The data looks like the following:
1313
// Instance | SparseField | SparseFeatureId | SparseFeatureVal |
1414
// 0 | 1, 8 | 384, 734 | 1.0, 1.0 |
15-
// 1 | 3 | 73 | 1.0 |
16-
// 2 | | | |
17-
// 3 | 2, 0 | 449, 31 | 1.0, 1.0 |
18-
// 4 | | | |
19-
// 5 | | | |
20-
// 6 | | | |
21-
// 7 | 5 | 465 | 1.0 |
15+
// 1 | 3 | 73 | 1.0 |
16+
// 2 | | | |
17+
// 3 | 2, 0 | 449, 31 | 1.0, 1.0 |
18+
// 4 | | | |
19+
// 5 | | | |
20+
// 6 | | | |
21+
// 7 | 5 | 465 | 1.0 |
2222
// SparseTensor for field id, each SparseTensor construtct of three Tensor
2323
auto dense_int_indices1 =
2424
test::AsTensor<int64>({0, 0, 0, 1, 1, 0, 3, 0, 3, 1, 7, 0}, {6, 2}); // 每个数据对应[i,j],共有6个数字,所以6行,每行最大2个数字,所以2列

0 commit comments

Comments
 (0)