| 93 | } |
| 94 | |
| 95 | Node* SparseFeatureIndices(Graph* const g, const int sparse_features_per_group, |
| 96 | const int num_examples) { |
| 97 | const int x_size = num_examples * 4; |
| 98 | Tensor data(DT_INT64, TensorShape({x_size})); |
| 99 | test::FillFn<int64>( |
| 100 | &data, [&](const int i) { return i % sparse_features_per_group; }); |
| 101 | return test::graph::Constant(g, data); |
| 102 | } |
| 103 | |
| 104 | Node* RandomZeroOrOne(Graph* const g, const int n) { |
| 105 | Tensor data(DT_FLOAT, TensorShape({n})); |
no test coverage detected