Skip to content
Snippets Groups Projects
Commit 1c19bfe1 authored by Martin Beseda's avatar Martin Beseda
Browse files

WIP: Trying to fix core dumped error

parents e4fca569 8582de5c
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,7 @@ namespace lib4neuro {
this->output_dim = 1;
if(ns) {
std::shared_ptr<NormalizationStrategy> ns_tmp = std::make_shared<NormalizationStrategy>(ns);
std::shared_ptr<NormalizationStrategy> ns_tmp(ns);
this->normalization_strategy = ns_tmp;
// this->max_min_inp_val.emplace_back(this->normalization_strategy->get_max_value());
// this->max_min_inp_val.emplace_back(this->normalization_strategy->get_min_value());
......@@ -400,6 +400,12 @@ namespace lib4neuro {
return this->normalization_strategy.get();
}
void DataSet::set_normalization_strategy(NormalizationStrategy* ns) {
if( ns ){
this->normalization_strategy.reset(ns);
}
}
bool DataSet::is_normalized() {
return !this->max_min_inp_val.empty();
}
......
......@@ -275,6 +275,8 @@ namespace lib4neuro {
*/
LIB4NEURO_API NormalizationStrategy* get_normalization_strategy();
LIB4NEURO_API void set_normalization_strategy(NormalizationStrategy* ns);
/**
*
* @return
......
......@@ -27,7 +27,7 @@ namespace lib4neuro {
* @param weights
* @return
*/
virtual double eval(std::shared_ptr<std::vector<double>> weights = nullptr, bool denormalize_data=false,
virtual double eval(std::vector<double>* weights = nullptr, bool denormalize_data=false,
bool verbose = false) = 0;
/**
......
......@@ -28,7 +28,7 @@ namespace lib4neuro {
private:
struct LevenbergMarquardtImpl;
std::unique_ptr<LevenbergMarquardtImpl> p_impl;
std::shared_ptr<LevenbergMarquardtImpl> p_impl;
public:
LevenbergMarquardt(int max_iters,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment