| 111 | } |
| 112 | |
| 113 | Node* RandomZeroOrOneMatrix(Graph* const g, const int n, int d) { |
| 114 | Tensor data(DT_FLOAT, TensorShape({n, d})); |
| 115 | test::FillFn<float>(&data, [](const int i) { |
| 116 | // Fill with 0.0 or 1.0 at random. |
| 117 | return (random::New64() % 2) == 0 ? 0.0f : 1.0f; |
| 118 | }); |
| 119 | return test::graph::Constant(g, data); |
| 120 | } |
| 121 | |
| 122 | void GetGraphs(const int32 num_examples, const int32 num_sparse_feature_groups, |
| 123 | const int32 sparse_features_per_group, |
no test coverage detected