| 287 | } |
| 288 | |
| 289 | int testMiniBatchSizeOutOfAllowedSet() { |
| 290 | |
| 291 | Specification::Model m; |
| 292 | |
| 293 | // basic neural network model without any updatable model parameters. |
| 294 | auto nn = buildBasicUpdatableNeuralNetworkModel(m); |
| 295 | |
| 296 | std::set<int64_t> allowedValues = std::set<int64_t>(); |
| 297 | allowedValues.insert(10); |
| 298 | allowedValues.insert(20); |
| 299 | allowedValues.insert(30); |
| 300 | allowedValues.insert(40); |
| 301 | |
| 302 | addLearningRate(nn, Specification::Optimizer::kSgdOptimizer, 0.7f, 0.0f, 1.0f); |
| 303 | addMiniBatchSize(nn, Specification::Optimizer::kSgdOptimizer, 5, 10, 100, allowedValues); |
| 304 | |
| 305 | // expect validation to fail due to conflict in updatable model parameter names. |
| 306 | Result res = Model::validate(m); |
| 307 | ML_ASSERT_BAD(res); |
| 308 | return 0; |
| 309 | } |
| 310 | |
| 311 | int testLearningRateOutOfAllowedRange() { |
| 312 |
nothing calls this directly
no test coverage detected