Fix some issues of svace and coverity.
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Seungbaek Hong <sb92.hong@samsung.com>
needs_calc_derivative(false),
needs_calc_gradient(false),
output_connections(),
+ tensor_type(TensorDim::Format::NCHW),
run_context(nullptr),
layer_node_props(
new PropsType(props::Name(), props::Distribute(), props::Trainable(), {},
/**
* @brief free layers
*/
-NeuralNetwork::~NeuralNetwork() { deallocate(); }
+NeuralNetwork::~NeuralNetwork() {
+ try {
+ deallocate();
+ } catch (const std::runtime_error &e) {
+ std::cerr << "Error occured during destroying NeuralNetwork: " << e.what()
+ << std::endl;
+ }
+}
/**
* @brief forward propagation using layers object which has layer
for (unsigned int j = 0; j < height(); j++) {
out << "{";
for (unsigned int l = 0; l < width(); l++) {
- if (l < channel() - 1)
+ if (l < width() - 1)
out << std::setw(10) << std::setprecision(10)
<< this->getValue(k, l, i, j) << ", ";
else