*/
std::string filename = data_path + "trainingSet.dat";
std::ofstream f(filename, std::ios::out | std::ios::binary);
- ExtractFeatures(data_path, inputVector, outputVector, "training", f);
+ try {
+ ExtractFeatures(data_path, inputVector, outputVector, "training", f);
+ } catch (...) {
+ std::cerr << "Error during open file: " << filename << std::endl;
+ return 1;
+ }
f.close();
}
*/
std::string filename = data_path + "valSet.dat";
std::ofstream f(filename, std::ios::out | std::ios::binary);
- ExtractFeatures(data_path, inputValVector, outputValVector, "val", f);
+ try {
+ ExtractFeatures(data_path, inputValVector, outputValVector, "val", f);
+ } catch (...) {
+ std::cerr << "Error during open file: " << filename << std::endl;
+ return 1;
+ }
f.close();
}
*/
std::string filename = data_path + "testSet.dat";
std::ofstream f(filename, std::ios::out | std::ios::binary);
- ExtractFeatures(data_path, inputTestVector, outputTestVector, "test", f);
+ try {
+ ExtractFeatures(data_path, inputTestVector, outputTestVector, "test", f);
+ } catch (...) {
+ std::cerr << "Error during open file: " << filename << std::endl;
+ return 1;
+ }
f.close();
}
* @note This name might be changed once this layer is added to the model
* to keep the name unique to the model
*/
- virtual const std::string getName() const noexcept = 0;
+ virtual const std::string getName() const = 0;
/**
* @brief Get the Weight object name
* @return std::string Name of the underlying object
* @note name of each node in the graph must be unique
*/
- virtual const std::string getName() const noexcept = 0;
+ virtual const std::string getName() const = 0;
/**
* @brief Set the Name of the underlying object
this->compute_engine = compute_engine;
}
-const std::string LayerNode::getName() const noexcept {
+const std::string LayerNode::getName() const {
auto &name = std::get<props::Name>(*layer_node_props);
return name.empty() ? "" : name.get();
}
* @note This name might be changed once this layer is added to the model
* to keep the name unique to the model
*/
- const std::string getName() const noexcept override;
+ const std::string getName() const override;
/**
* Support all the interface requirements by nntrainer::GraphNode