In the constructor the member variable expected_loss is not initialized.
expected_loss will be read later in readIteration function so initialized with 0.0
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
dataset = createDataset(ml::train::DatasetType::GENERATOR);
dataset->setGeneratorFunc(ml::train::DatasetDataType::DATA_TRAIN,
getBatch_train);
- dataset->setGeneratorFunc(ml::train::DatasetDataType::DATA_VAL, getBatch_val);
+ dataset->setGeneratorFunc(ml::train::DatasetDataType::DATA_VAL,
+ getBatch_val);
} catch (...) {
std::cerr << "Error creating dataset" << std::endl;
return 1;
}
if (buf_ == MAP_FAILED) {
- #ifdef __ANDROID__
- if (fd_ != -1) {
- // unlink / close the given fd here
- close(fd_);
- }
- #endif
+#ifdef __ANDROID__
+ if (fd_ != -1) {
+ // unlink / close the given fd here
+ close(fd_);
+ }
+#endif
throw std::runtime_error("[MMapedMemory] mmap failed");
}
}
GraphWatcher::GraphWatcher(const std::string &config, const bool opt) :
+ expected_loss(0.0),
optimize(opt) {
nn = nntrainer::NeuralNetwork();