Skip to content

Commit

Permalink
fix linux compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Jun 19, 2024
1 parent fcf5561 commit 9ba8518
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
6 changes: 1 addition & 5 deletions components/nn/include/maix_nn_self_learn_classifier.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#pragma once

#include "maix_basic.hpp"
#include "maix_nn_maixcam.hpp"

namespace maix::nn
{
Expand Down Expand Up @@ -272,10 +271,7 @@ namespace maix::nn
* @return learn epoch(times), 0 means learn nothing.
* @maixpy maix.nn.SelfLearnClassifier.learn
*/
int learn()
{
return maix_nn_self_learn_classifier_learn(_features, _features_sample, _feature_num);
}
int learn();

/**
* Clear all class and samples
Expand Down
9 changes: 9 additions & 0 deletions components/nn/src/maix_nn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,13 @@ namespace maix::nn
return _impl->forward_image(img, mean, scale, fit, copy_result);
}

int SelfLearnClassifier::learn()
{
#if PLATFORM_MAIXCAM
return maix_nn_self_learn_classifier_learn(_features, _features_sample, _feature_num);
#else
throw err::Exception(err::ERR_NOT_IMPL);
#endif
}

} // namespace maix::nn
8 changes: 4 additions & 4 deletions components/vision/port/linux/maix_jpg_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ namespace maix::http
}

err::Err JpegStreamer::start() {

return err::ERR_NOT_IMPL;
}

err::Err JpegStreamer::stop() {

return err::ERR_NOT_IMPL;
}

err::Err JpegStreamer::write(image::Image *img) {

return err::ERR_NOT_IMPL;
}

err::Err JpegStreamer::set_html(std::string data) {

return err::ERR_NOT_IMPL;
}
}

0 comments on commit 9ba8518

Please sign in to comment.