Skip to content

Commit

Permalink
Fixed unused-variable error
Browse files Browse the repository at this point in the history
  • Loading branch information
EvertBunschoten committed Sep 15, 2022
1 parent b233278 commit 47b456c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Common/src/toolboxes/multilayer_perceptron/CLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <cstring>
using namespace std;

MLPToolbox::CLayer::CLayer() : CLayer(1) {};
MLPToolbox::CLayer::CLayer() : CLayer(1) {}

MLPToolbox::CLayer::CLayer(unsigned long n_neurons) : number_of_neurons{n_neurons}, is_input{false}
{
Expand Down
5 changes: 2 additions & 3 deletions Common/src/toolboxes/multilayer_perceptron/CNeuralNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ using namespace std;


void MLPToolbox::CNeuralNetwork::predict(vector<su2double> &inputs){
su2double x, x_norm, y, y_norm, tanx;
size_t iNeuron, jNeuron, iLayer, nNeurons_current, nNeurons_previous;
su2double x, x_norm, y, y_norm;
size_t iNeuron, iLayer, nNeurons_current;
bool same_point{true};
for(iNeuron=0; iNeuron<inputLayer->getNNeurons(); iNeuron++){
x_norm = (inputs[iNeuron] - input_norm[iNeuron].first)/(input_norm[iNeuron].second - input_norm[iNeuron].first);
Expand All @@ -44,7 +44,6 @@ void MLPToolbox::CNeuralNetwork::predict(vector<su2double> &inputs){
if(!same_point){
for(iLayer=1; iLayer<n_hidden_layers + 2; iLayer++){
nNeurons_current = total_layers[iLayer]->getNNeurons();
nNeurons_previous = total_layers[iLayer - 1]->getNNeurons();

for(iNeuron=0; iNeuron<nNeurons_current; iNeuron++){
x = ComputeX(iLayer, iNeuron);
Expand Down

0 comments on commit 47b456c

Please sign in to comment.