Skip to content

Commit 90268e1

Browse files
authored
Merge pull request #1222 from reyoung/feature/remove_unused_function_in_trainer
Remove unused init method in paddle::Trainer
2 parents 912b5c7 + 1f97236 commit 90268e1

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

paddle/trainer/Trainer.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,6 @@ DEFINE_string(model_list, "", "File that saves the model list when evaluation");
9090

9191
namespace paddle {
9292

93-
void Trainer::init(int argc, char** argv) {
94-
initMain(argc, argv);
95-
initPython(argc, argv);
96-
97-
auto config = TrainerConfigHelper::createFromFlagConfig();
98-
feenableexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
99-
100-
init(config);
101-
}
102-
10393
void Trainer::init(const std::shared_ptr<TrainerConfigHelper>& config,
10494
bool testing,
10595
const std::shared_ptr<GradientMachine>& gradientMachine,

paddle/trainer/Trainer.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ class Trainer {
7171
const std::shared_ptr<DataProvider>& dataProvider = nullptr,
7272
const std::shared_ptr<DataProvider>& testDataProvider = nullptr);
7373

74-
/**
75-
* Initialize Trainer from command line flags.
76-
*/
77-
void init(int argc, char** argv);
78-
7974
/**
8075
* Train until num_passes reached.
8176
* One pass means neural network train through all training data.

0 commit comments

Comments
 (0)