Ashwini Khade 2023-03-08 09:49:15 -08:00 committed by GitHub
parent 112a4d215a
commit f14ab63c19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -206,7 +206,7 @@ TEST(CheckpointApiTest, SaveOptimizerStateAsCheckpoint_ThenLoad_CUDA) {
auto optim_uri = "testdata/training_api/adamw.onnx";
// Generate randomized weight values using synthetic data generator.
const int64_t fc2_weight_dim_in = 10, fc2_weight_dim_out = 500, fc1_weight_dim_in = 500, fc1_weight_dim_out = 784;
constexpr int64_t fc2_weight_dim_in = 10, fc2_weight_dim_out = 500, fc1_weight_dim_in = 500, fc1_weight_dim_out = 784;
const std::vector<int64_t> fc1_weight_shape{fc1_weight_dim_in, fc1_weight_dim_out};
const std::vector<int64_t> fc1_bias_shape{fc1_weight_dim_in};
const std::vector<int64_t> fc2_weight_shape{fc2_weight_dim_in, fc2_weight_dim_out};

View file

@ -114,9 +114,9 @@ void TestModuleExport(const std::vector<std::shared_ptr<IExecutionProvider>>& pr
#if defined(USE_CUDA)
const int64_t total_step_count = 100;
const float initial_lr = 1e-3f;
const int64_t resume_step = total_step_count / 2;
constexpr int64_t total_step_count = 100;
constexpr float initial_lr = 1e-3f;
constexpr int64_t resume_step = total_step_count / 2;
void CompareValue(float expected, float output, float rtol = 1e-4, float atol = 1e-5) {
ASSERT_NEAR(expected, output, atol);