Skip to content

Commit 9e83500

Browse files
committed
Fixed a couple of warnings as errors.
1 parent 4cf7313 commit 9e83500

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

src/neuralnetwork/elmanrnnlayer.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,37 +182,37 @@ class ElmanRNNLayer final : public Layer
182182
return _rw_decays;
183183
}
184184

185-
void set_rw_values(const std::vector<double>& v)
185+
void set_rw_values(const std::vector<double>& v) override
186186
{
187187
MYODDWEB_PROFILE_FUNCTION("ElmanRNNLayer");
188188
_rw_values = v;
189189
}
190-
void set_rw_grads(const std::vector<double>& v)
190+
void set_rw_grads(const std::vector<double>& v) override
191191
{
192192
MYODDWEB_PROFILE_FUNCTION("ElmanRNNLayer");
193193
_rw_grads = v;
194194
}
195-
void set_rw_velocities(const std::vector<double>& v)
195+
void set_rw_velocities(const std::vector<double>& v) override
196196
{
197197
MYODDWEB_PROFILE_FUNCTION("ElmanRNNLayer");
198198
_rw_velocities = v;
199199
}
200-
void set_rw_m1(const std::vector<double>& v)
200+
void set_rw_m1(const std::vector<double>& v) override
201201
{
202202
MYODDWEB_PROFILE_FUNCTION("ElmanRNNLayer");
203203
_rw_m1 = v;
204204
}
205-
void set_rw_m2(const std::vector<double>& v)
205+
void set_rw_m2(const std::vector<double>& v) override
206206
{
207207
MYODDWEB_PROFILE_FUNCTION("ElmanRNNLayer");
208208
_rw_m2 = v;
209209
}
210-
void set_rw_timesteps(const std::vector<long long>& v)
210+
void set_rw_timesteps(const std::vector<long long>& v) override
211211
{
212212
MYODDWEB_PROFILE_FUNCTION("ElmanRNNLayer");
213213
_rw_timesteps = v;
214214
}
215-
void set_rw_decays(const std::vector<double>& v)
215+
void set_rw_decays(const std::vector<double>& v) override
216216
{
217217
MYODDWEB_PROFILE_FUNCTION("ElmanRNNLayer");
218218
_rw_decays = v;

src/neuralnetwork/layer.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ void Layer::calculate_error_deltas(
126126

127127
switch (error_calculation_type)
128128
{
129+
case ErrorCalculation::type::none:
130+
return;
129131
case ErrorCalculation::type::huber_loss:
130132
return calculate_huber_loss_error_deltas(deltas, target_outputs, given_outputs, evaluation_config, activation_method, neurons_span);
131133
case ErrorCalculation::type::huber_direction_loss:
@@ -140,8 +142,15 @@ void Layer::calculate_error_deltas(
140142
return calculate_cross_entropy_error_deltas(deltas, target_outputs, given_outputs, evaluation_config, activation_method, neurons_span);
141143
case ErrorCalculation::type::log_cosh:
142144
return calculate_log_cosh_error_deltas(deltas, target_outputs, given_outputs, activation_method, neurons_span);
143-
default:
144-
Logger::panic("Error calculation type, ", ErrorCalculation::type_to_string(error_calculation_type), " is not supported for Layer!");
145+
case ErrorCalculation::type::mae:
146+
case ErrorCalculation::type::nrmse:
147+
case ErrorCalculation::type::mape:
148+
case ErrorCalculation::type::smape:
149+
case ErrorCalculation::type::wape:
150+
case ErrorCalculation::type::directional_accuracy:
151+
case ErrorCalculation::type::directional_confidence_score:
152+
case ErrorCalculation::type::prediction_coverage:
153+
Logger::panic("Error calculation type, ", ErrorCalculation::type_to_string(error_calculation_type), " is not supported for Layer training!");
145154
}
146155
}
147156

0 commit comments

Comments
 (0)