Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ unittest/modelfile ] Fix backbone_n_15 @open sesame 10/17 17:36 #2769

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions test/unittest/unittest_nntrainer_modelfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,27 +638,24 @@ TEST(nntrainerIniTest, backbone_07_p) {
/**
* @brief Ini file unittest with backbone
* @note Input shape is provided in model file
* @todo C++ exception with description "First node must be identified as an
* input if it is qualified to be input, name: conv2d" thrown in the test body.
*/
// TEST(nntrainerIniTest, backbone_15_n) {
// ScopedIni base("base", {conv2d, conv2d});
TEST(nntrainerIniTest, backbone_15_n) {
ScopedIni base("base", {conv2d, conv2d});

// ScopedIni full("backbone_15_n_scaled", {nw_base_mse, adam,
// backbone_valid});
ScopedIni full("backbone_15_n_scaled", {nw_base_mse, adam, backbone_valid});

// nntrainer::NeuralNetwork NN_scaled, NN_full;
// EXPECT_EQ(NN_full.loadFromConfig(full.getIniName()), ML_ERROR_NONE);
// EXPECT_EQ(NN_full.compile(), ML_ERROR_NONE);
// EXPECT_THROW(NN_full.initialize(), std::invalid_argument);
nntrainer::NeuralNetwork NN_scaled, NN_full;
EXPECT_EQ(NN_full.loadFromConfig(full.getIniName()), ML_ERROR_NONE);
EXPECT_THROW(NN_full.compile(), std::invalid_argument);
EXPECT_EQ(NN_full.initialize(), ML_ERROR_NOT_SUPPORTED);

// ScopedIni scaled("backbone_15_n_scaled",
// {nw_base_mse, adam, backbone_scaled});
ScopedIni scaled("backbone_15_n_scaled",
{nw_base_mse, adam, backbone_scaled});

// EXPECT_EQ(NN_scaled.loadFromConfig(scaled.getIniName()), ML_ERROR_NONE);
// EXPECT_EQ(NN_scaled.compile(), ML_ERROR_NONE);
// EXPECT_THROW(NN_scaled.initialize(), std::invalid_argument);
// }
EXPECT_EQ(NN_scaled.loadFromConfig(scaled.getIniName()), ML_ERROR_NONE);
EXPECT_THROW(NN_scaled.compile(), std::invalid_argument);
EXPECT_EQ(NN_scaled.initialize(), ML_ERROR_NOT_SUPPORTED);
}
/**
* @brief Ini file unittest with backbone
* @note Input shape is striped from backbone and not provided in model file
Expand Down
Loading